Skip to content

Commit

Permalink
Merge pull request #203 from bcgov/project-model
Browse files Browse the repository at this point in the history
removed setter restriction
  • Loading branch information
saravanpa-aot authored Jan 23, 2025
2 parents c219bdd + 326778d commit a867033
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions compliance-api/src/compliance_api/models/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,3 @@ class Project(BaseModel):

id = Column(Integer, primary_key=True)
name = Column(String, nullable=False)

def __setattr__(self, key, value):
"""Set attribute value."""
if hasattr(self, key):
raise AttributeError(f"Cannot modify {key}. This class is read-only.")
super().__setattr__(key, value)

0 comments on commit a867033

Please sign in to comment.