| @@ 34-46 (lines=13) @@ | ||
| 31 | context = self.context |
|
| 32 | return field.checkPermission("set", context) |
|
| 33 | ||
| 34 | def get_field_by_name(self, name): |
|
| 35 | """Get the field by name |
|
| 36 | """ |
|
| 37 | field = self.fields.get(name) |
|
| 38 | ||
| 39 | # try to fetch the field w/o the `get` prefix |
|
| 40 | # this might be the case is some listings |
|
| 41 | if field is None: |
|
| 42 | # ensure we do not have the field setter as column |
|
| 43 | name = name.split("get", 1)[-1] |
|
| 44 | field = self.fields.get(name) |
|
| 45 | ||
| 46 | return field |
|
| 47 | ||
| 48 | def get(self, name): |
|
| 49 | """Get sample field |
|
| @@ 34-46 (lines=13) @@ | ||
| 31 | context = self.context |
|
| 32 | return field.checkPermission("set", context) |
|
| 33 | ||
| 34 | def get_field_by_name(self, name): |
|
| 35 | """Get the field by name |
|
| 36 | """ |
|
| 37 | field = self.fields.get(name) |
|
| 38 | ||
| 39 | # try to fetch the field w/o the `get` prefix |
|
| 40 | # this might be the case is some listings |
|
| 41 | if field is None: |
|
| 42 | # ensure we do not have the field setter as column |
|
| 43 | name = name.split("get", 1)[-1] |
|
| 44 | field = self.fields.get(name) |
|
| 45 | ||
| 46 | return field |
|
| 47 | ||
| 48 | def get(self, name): |
|
| 49 | """Get sample field |
|