Fix redirection after creating FHRP group assignment

This commit is contained in:
jeremystretch 2021-11-19 10:42:13 -05:00
parent 1b217fb02e
commit 1e279070a0

View File

@ -93,3 +93,9 @@ class FHRPGroupAssignment(ChangeLoggedModel):
def __str__(self):
return f'{self.interface}: {self.group} ({self.priority})'
def get_absolute_url(self):
# Used primarily for redirection after creating a new assignment
if self.interface:
return self.interface.get_absolute_url()
return None