Fix sample data to generate alwais the same data
parent
a6f5b4c0ec
commit
0e125d7342
|
@ -347,7 +347,7 @@ class Command(BaseCommand):
|
||||||
bug.save()
|
bug.save()
|
||||||
|
|
||||||
custom_attributes_values = {str(ca.id): self.get_custom_attributes_value(ca.type) for ca
|
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:
|
if custom_attributes_values:
|
||||||
bug.custom_attributes_values.attributes_values = custom_attributes_values
|
bug.custom_attributes_values.attributes_values = custom_attributes_values
|
||||||
bug.custom_attributes_values.save()
|
bug.custom_attributes_values.save()
|
||||||
|
@ -399,7 +399,7 @@ class Command(BaseCommand):
|
||||||
task.save()
|
task.save()
|
||||||
|
|
||||||
custom_attributes_values = {str(ca.id): self.get_custom_attributes_value(ca.type) for ca
|
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:
|
if custom_attributes_values:
|
||||||
task.custom_attributes_values.attributes_values = custom_attributes_values
|
task.custom_attributes_values.attributes_values = custom_attributes_values
|
||||||
task.custom_attributes_values.save()
|
task.custom_attributes_values.save()
|
||||||
|
@ -447,7 +447,7 @@ class Command(BaseCommand):
|
||||||
us.save()
|
us.save()
|
||||||
|
|
||||||
custom_attributes_values = {str(ca.id): self.get_custom_attributes_value(ca.type) for ca
|
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:
|
if custom_attributes_values:
|
||||||
us.custom_attributes_values.attributes_values = custom_attributes_values
|
us.custom_attributes_values.attributes_values = custom_attributes_values
|
||||||
us.custom_attributes_values.save()
|
us.custom_attributes_values.save()
|
||||||
|
|
|
@ -16,11 +16,10 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from django.apps import apps
|
|
||||||
|
|
||||||
from taiga.base.filters import PermissionBasedFilterBackend
|
from taiga.base.filters import PermissionBasedFilterBackend
|
||||||
from . import services
|
from . import services
|
||||||
|
|
||||||
|
|
||||||
class ContactsFilterBackend(PermissionBasedFilterBackend):
|
class ContactsFilterBackend(PermissionBasedFilterBackend):
|
||||||
def filter_queryset(self, user, request, queryset, view):
|
def filter_queryset(self, user, request, queryset, view):
|
||||||
qs = queryset.filter(is_active=True)
|
qs = queryset.filter(is_active=True)
|
||||||
|
|
Loading…
Reference in New Issue