get_absolute_url implemenation for Role

This commit is contained in:
Akita Noek
2016-02-22 14:55:32 -05:00
parent 5071dba4ff
commit dce474ec5e

View File

@@ -45,6 +45,9 @@ class Role(CommonModelNameNotUnique):
super(Role, self).save(*args, **kwargs) super(Role, self).save(*args, **kwargs)
self.rebuild_role_ancestor_list() self.rebuild_role_ancestor_list()
def get_absolute_url(self):
return reverse('api:role_detail', args=(self.pk,))
def rebuild_role_ancestor_list(self): def rebuild_role_ancestor_list(self):
''' '''
Updates our `ancestors` map to accurately reflect all of the ancestors for a role Updates our `ancestors` map to accurately reflect all of the ancestors for a role