diff --git a/taiga/projects/management/commands/sample_data.py b/taiga/projects/management/commands/sample_data.py index f474de86..7ced0599 100644 --- a/taiga/projects/management/commands/sample_data.py +++ b/taiga/projects/management/commands/sample_data.py @@ -347,7 +347,7 @@ class Command(BaseCommand): bug.save() custom_attributes_values = {str(ca.id): self.get_custom_attributes_value(ca.type) for ca - in project.issuecustomattributes.all() if self.sd.boolean()} + in project.issuecustomattributes.all().order_by('id') if self.sd.boolean()} if custom_attributes_values: bug.custom_attributes_values.attributes_values = custom_attributes_values bug.custom_attributes_values.save() @@ -399,7 +399,7 @@ class Command(BaseCommand): task.save() custom_attributes_values = {str(ca.id): self.get_custom_attributes_value(ca.type) for ca - in project.taskcustomattributes.all() if self.sd.boolean()} + in project.taskcustomattributes.all().order_by('id') if self.sd.boolean()} if custom_attributes_values: task.custom_attributes_values.attributes_values = custom_attributes_values task.custom_attributes_values.save() @@ -447,7 +447,7 @@ class Command(BaseCommand): us.save() custom_attributes_values = {str(ca.id): self.get_custom_attributes_value(ca.type) for ca - in project.userstorycustomattributes.all() if self.sd.boolean()} + in project.userstorycustomattributes.all().order_by('id') if self.sd.boolean()} if custom_attributes_values: us.custom_attributes_values.attributes_values = custom_attributes_values us.custom_attributes_values.save() diff --git a/taiga/users/filters.py b/taiga/users/filters.py index 4e4dc116..46dd88ac 100644 --- a/taiga/users/filters.py +++ b/taiga/users/filters.py @@ -16,11 +16,10 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -from django.apps import apps - from taiga.base.filters import PermissionBasedFilterBackend from . import services + class ContactsFilterBackend(PermissionBasedFilterBackend): def filter_queryset(self, user, request, queryset, view): qs = queryset.filter(is_active=True)