Skip to content

Commit

Permalink
chore: add extra config to make Unit model hashable
Browse files Browse the repository at this point in the history
  • Loading branch information
djs0109 committed Mar 3, 2023
1 parent 85accf8 commit 884a7e6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions filip/models/ngsi_v2/units.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ class Unit(BaseModel):
class Config:
extra = 'ignore'
allow_population_by_field_name = True
allow_mutation = False
frozen = True

@root_validator(pre=False, allow_reuse=True)
def check_consistency(cls, values):
Expand Down

0 comments on commit 884a7e6

Please sign in to comment.