Skip to content

Commit

Permalink
Merge pull request #62 from HybriD3-database/hotfix_api_dimensionality
Browse files Browse the repository at this point in the history
Fixed reverse mapping of dimensionality in API
  • Loading branch information
uthpalaherath authored Nov 19, 2024
2 parents 489e911 + 6501a03 commit 101d162
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions materials/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,12 @@ class Meta:
"stoichiometry",
)

def to_representation(self, instance):
representation = super().to_representation(instance)
representation["dimensionality"] = DIMENSIONALITIES.get(
instance.dimensionality, None
)
return representation
def to_representation(self, instance):
representation = super().to_representation(instance)
representation["dimensionality"] = DIMENSIONALITIES.get(
instance.dimensionality, None
)
return representation

def get_stoichiometry(self, obj):
# Retrieve the first related System_Stoichiometry instance
Expand Down

0 comments on commit 101d162

Please sign in to comment.