Skip to content

Commit

Permalink
Update project.py to remove setters
Browse files Browse the repository at this point in the history
  • Loading branch information
saravanpa-aot authored Jan 23, 2025
1 parent 2d8791c commit d6c2892
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 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,4 @@ class Project(BaseModelVersioned):

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 d6c2892

Please sign in to comment.