Skip to content

Commit

Permalink
Migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBirdie authored and TheBirdie committed Feb 11, 2016
1 parent dbfe2e2 commit cf36527
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions sigma_core/models/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ class Cluster(Group):

DEFAULT_MEMBER_RANK = 1

# Related fields:
# - cluster_users (model User.clusters)

def save(self, *args, **kwargs):
"""
Clusters are special groups: some params cannot be specified by user.
Expand Down
2 changes: 1 addition & 1 deletion sigma_core/models/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class User(AbstractBaseUser):
is_superuser = models.BooleanField(default=False)
is_staff = models.BooleanField(default=False)

clusters = models.ManyToManyField('Cluster', related_name="users") # users should be members of at least one cluster
clusters = models.ManyToManyField('Cluster', related_name="cluster_users") # users should be members of at least one cluster

objects = UserManager()

Expand Down

0 comments on commit cf36527

Please sign in to comment.