diff --git a/b2share/modules/deposit/api.py b/b2share/modules/deposit/api.py index cec6ca1057..f531546737 100644 --- a/b2share/modules/deposit/api.py +++ b/b2share/modules/deposit/api.py @@ -258,9 +258,12 @@ def create(cls, data, id_=None, version_of=None): properties = {} if 'properties' in schema_dict: properties = schema_dict['properties'] - community_metadata = {} + try: + community_metadata = data['community_specific'][bs_id] + except KeyError: + community_metadata = {} for key in required: - if properties[key]['type'] == 'boolean': + if properties[key]['type'] == 'boolean' and not key in community_metadata: community_metadata[key] = False data['community_specific'] = {bs_id: community_metadata}