Evaluate by file extension to accomodate for uploads
@@ -324,8 +324,7 @@ def get_page_context(page, user, resource_edit=False, extended_metadata_layout=N
'topics_json': mark_safe(escapejs(json.dumps(topics))),
'czo_user': any("CZO National" in x.name for x in user.uaccess.communities),
'odm2_terms': list(ODM2Variable.all()),
- 'external_content': len([x.logical_file_content_type_id for x in content_model.files.all() if
- x.logical_file_content_type_id == 203]), # 203 .url external reference
+ 'external_content': len([x.file_name for x in content_model.files.all() if '.url' in x.file_name])
}
return context
