Skip to content

Commit

Permalink
fix: Limit group names to 80 characters
Browse files Browse the repository at this point in the history
Fixes #6416
  • Loading branch information
larseggert committed Oct 2, 2023
1 parent d6f5564 commit 5105705
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ietf/group/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ class Meta:
uses_milestone_dates = True
used_roles = [] # type: List[str]

@classmethod
def _create(cls, model_class, *args, **kwargs):
obj = model_class(*args, **kwargs)
obj.name = obj.name[0:80] # db only allows names of 80 characters max
obj.save()
return obj

@factory.lazy_attribute
def parent(self):
if self.type_id in ['wg','ag']:
Expand Down

0 comments on commit 5105705

Please sign in to comment.