Commit edda6cf9 authored by Thomas Monjalon's avatar Thomas Monjalon Committed by Damien Lespiau
Browse files

models: Allow to unselect maintainer projects in user profile



The admin page for user profiles have a field "Maintainer projects"
to grant maintainer rights to an user. It is a list of available
projects. When a project was selected, it was impossible to revoke.
It is now possible to unselect by clicking while holding the "Ctrl"
key.

v2: Port to fdo's patchwork (Damien)
Signed-off-by: default avatarThomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: default avatarStephen Finucane <stephen.finucane@intel.com>
parent b24ef3f8
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('patchwork', '0020_series_state'),
]
operations = [
migrations.AlterField(
model_name='userprofile',
name='maintainer_projects',
field=models.ManyToManyField(related_name='maintainer_project', to='patchwork.Project', blank=True),
),
]
......@@ -146,7 +146,7 @@ class UserProfile(models.Model):
user = models.OneToOneField(User, unique=True, related_name='profile')
primary_project = models.ForeignKey(Project, null=True, blank=True)
maintainer_projects = models.ManyToManyField(Project,
related_name='maintainer_project')
related_name='maintainer_project', blank=True)
send_email = models.BooleanField(default=False,
help_text='Selecting this option allows patchwork to send ' +
'email on your behalf')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment