fix: prevent direct edit of farmos_uuid and drupal_id fields
This commit is contained in:
parent
e9161e8c93
commit
df4536741d
1 changed files with 17 additions and 0 deletions
|
|
@ -68,3 +68,20 @@ class WuttaFarmMasterView(MasterView):
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
def configure_form(self, form):
|
||||||
|
""" """
|
||||||
|
f = form
|
||||||
|
super().configure_form(f)
|
||||||
|
|
||||||
|
# farmos_uuid
|
||||||
|
if self.creating:
|
||||||
|
f.remove("farmos_uuid")
|
||||||
|
else:
|
||||||
|
f.set_readonly("farmos_uuid")
|
||||||
|
|
||||||
|
# drupal_id
|
||||||
|
if self.creating:
|
||||||
|
f.remove("drupal_id")
|
||||||
|
else:
|
||||||
|
f.set_readonly("drupal_id")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue