Skip to content

Commit

Permalink
OpenConceptLab/ocl_issues#1867 | Checksum | userprofile resource type…
Browse files Browse the repository at this point in the history
… same as user
  • Loading branch information
snyaggarwal committed Jul 26, 2024
1 parent 5663f9f commit 92c0a67
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions ocldev/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
import oclexport
import oclfleximporter
import oclresourcelist
import checksum
4 changes: 2 additions & 2 deletions ocldev/checksum.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def __init__(self, resource, data, checksum_type='standard', verbosity=0):
self.data = self.flatten([data])
self.verbosity = verbosity
if self.resource and self.resource.lower() not in [
'concept', 'mapping', 'source', 'collection', 'organization', 'org', 'user']:
'concept', 'mapping', 'source', 'collection', 'organization', 'org', 'user', 'userprofile']:
raise ValueError(f"Invalid resource: {self.resource}")
if self.checksum_type not in ['standard', 'smart']:
raise ValueError(f"Invalid checksum type: {self.checksum_type}")
Expand Down Expand Up @@ -51,7 +51,7 @@ def _get_data_by_resource(self):
data = [self.get_mapping_fields(_data) for _data in self.data]
elif self.resource in ['organization', 'org']:
data = [self.get_organization_fields(_data) for _data in self.data]
elif self.resource == 'user':
elif self.resource in ['user', 'userprofile']:
data = [self.get_user_fields(_data) for _data in self.data]
elif self.resource == 'source':
data = [self.get_source_fields(_data) for _data in self.data]
Expand Down

0 comments on commit 92c0a67

Please sign in to comment.