Fix sample data to generate alwais the same data

remotes/origin/issue/4795/notification_even_they_are_disabled
Jesús Espino 2016-08-12 10:11:21 +02:00
parent a6f5b4c0ec
commit 0e125d7342
2 changed files with 4 additions and 5 deletions

View File

@ -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()

View File

@ -16,11 +16,10 @@
# 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/>.
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)