Skip to content

Commit

Permalink
OpenConceptLab/ocl_issues#1867 | Checksum | fixing resource types
Browse files Browse the repository at this point in the history
  • Loading branch information
snyaggarwal committed Jul 31, 2024
1 parent e2e6267 commit 35342b7
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ocldev/checksum.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,21 @@ def generate(self):
return self._generate(checksums)

def _get_data_by_resource(self):
if self.resource == 'conceptname':
if self.resource in ['conceptname', 'conceptnames']:
return [self.get_concept_name_fields(_data) for _data in self.data]
if self.resource == 'conceptdescription':
if self.resource in ['conceptdescription', 'conceptdescriptions']:
return [self.get_concept_description_fields(_data) for _data in self.data]
if self.resource == 'concept':
if self.resource in ['concept', 'concepts', 'concept_version', 'concept_versions']:
return [self.get_concept_fields(_data) for _data in self.data]
if self.resource == 'mapping':
if self.resource in ['mapping', 'mappings', 'mapping_version', 'mapping_versions']:
return [self.get_mapping_fields(_data) for _data in self.data]
if self.resource in ['organization', 'org']:
if self.resource in ['organization', 'org', 'orgs', 'organizations']:
return [self.get_organization_fields(_data) for _data in self.data]
if self.resource in ['user', 'userprofile']:
if self.resource in ['user', 'userprofile', 'users', 'userprofiles']:
return [self.get_user_fields(_data) for _data in self.data]
if self.resource == 'source':
if self.resource in ['source', 'sources', 'source_version', 'source_versions']:
return [self.get_source_fields(_data) for _data in self.data]
if self.resource == 'collection':
if self.resource in ['collection', 'collections', 'collection_version', 'collection_versions']:
return [self.get_collection_fields(_data) for _data in self.data]

return self.data
Expand Down

0 comments on commit 35342b7

Please sign in to comment.