Skip to content

Commit e1cf5cc

Browse files
committed
Only non-staff users should be assigned explicitly
1 parent 0f3502d commit e1cf5cc

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

projects/migrations/0001_initial.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ class Migration(migrations.Migration):
3535
(
3636
"users",
3737
models.ManyToManyField(
38+
blank=True,
39+
limit_choices_to={"is_staff": False},
3840
related_name="projects",
3941
to=settings.AUTH_USER_MODEL,
4042
verbose_name="users",

projects/models.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ class Project(models.Model):
3636
settings.AUTH_USER_MODEL,
3737
related_name="projects",
3838
verbose_name=_("users"),
39+
blank=True, # Only internal is fine.
40+
limit_choices_to={"is_staff": False},
3941
)
4042
token = models.CharField(_("token"), max_length=100, editable=False, unique=True)
4143

0 commit comments

Comments
 (0)