Skip to content

Commit

Permalink
update: rename
Browse files Browse the repository at this point in the history
  • Loading branch information
VsevolodX committed Aug 12, 2024
1 parent 8ce0856 commit 4c6a391
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/py/mat3ra/made/tools/build/defect/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def _json(self):
**super()._json,
"type": self.get_cls_name(),
"defect_type": self.defect_type.name,
"condition": self.condition.to_json(),
"condition": self.condition.get_json(),
}


Expand Down
6 changes: 4 additions & 2 deletions src/py/mat3ra/made/tools/utils/coordinate.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,10 @@ class CoordinateCondition(BaseModel):
def condition(self, coordinate: List[float]) -> bool:
raise NotImplementedError

def to_json(self) -> Dict:
return self.dict()
def get_json(self) -> Dict:
json = {"type": self.__class__.__name__}
json.update(self.dict())
return json


class CylinderCoordinateCondition(CoordinateCondition):
Expand Down

0 comments on commit 4c6a391

Please sign in to comment.