Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Janne Karjalainen authored and hjhsalo committed Sep 8, 2020
1 parent 7e9a451 commit 8c09b26
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions b2share/modules/deposit/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down

0 comments on commit 8c09b26

Please sign in to comment.