backoffice: skip un-typed datasources when looking for card usage (#47600)

This commit is contained in:
Frédéric Péters 2020-10-13 09:50:56 +02:00
parent 6e137a034e
commit bcbaabf181
1 changed files with 1 additions and 1 deletions

View File

@ -181,7 +181,7 @@ class CardDefPage(FormDefPage):
def is_used_in_formdef(formdef):
for field in formdef.fields or []:
data_source = getattr(field, 'data_source', None)
if not data_source:
if not (data_source and data_source.get('type')):
continue
data_source_id = 'carddef:%s' % self.formdef.url_name
if data_source.get('type') == data_source_id: