Skip to content

Commit

Permalink
OpenConceptLab/ocl_issues#1163 | importers | handling when no 'type' …
Browse files Browse the repository at this point in the history
…is provided
  • Loading branch information
snyaggarwal committed Jan 3, 2022
1 parent 8fdfb69 commit 97400f7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/importers/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,9 @@ def __init__(
def make_resource_distribution(self):
for line in self.input_list:
data = line if isinstance(line, dict) else json.loads(line)
data_type = data['type']
data_type = data.get('type', None)
if not data_type:
continue
if data_type not in self.resource_distribution:
self.resource_distribution[data_type] = []
self.resource_distribution[data_type].append(data)
Expand Down

0 comments on commit 97400f7

Please sign in to comment.