fix: suppress output when user farmos/drupal keys are empty
This commit is contained in:
parent
96d575feb7
commit
98be276bd1
1 changed files with 4 additions and 2 deletions
|
|
@ -23,6 +23,8 @@
|
|||
Views for Users
|
||||
"""
|
||||
|
||||
import colander
|
||||
|
||||
from wuttaweb.views import users as base
|
||||
|
||||
|
||||
|
|
@ -53,12 +55,12 @@ class UserView(base.UserView):
|
|||
# farmos_uuid
|
||||
if not self.creating:
|
||||
f.fields.append("farmos_uuid")
|
||||
f.set_default("farmos_uuid", user.farmos_uuid)
|
||||
f.set_default("farmos_uuid", user.farmos_uuid or colander.null)
|
||||
|
||||
# drupal_id
|
||||
if not self.creating:
|
||||
f.fields.append("drupal_id")
|
||||
f.set_default("drupal_id", user.drupal_id)
|
||||
f.set_default("drupal_id", user.drupal_id or colander.null)
|
||||
|
||||
def get_xref_buttons(self, user):
|
||||
buttons = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue