Skip to content
This repository has been archived by the owner on Aug 24, 2022. It is now read-only.

Commit

Permalink
obsolete protocols
Browse files Browse the repository at this point in the history
  • Loading branch information
risufaj committed Nov 5, 2018
1 parent d623a26 commit abdac1e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
10 changes: 2 additions & 8 deletions invoicing/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,20 +288,14 @@ class FixedCostsViewSet(mixins.UpdateModelMixin,
class LibraryPreparationCostsViewSet(mixins.UpdateModelMixin,
viewsets.ReadOnlyModelViewSet):
""" Get the list of Library Preparation Costs. """
obsolete_protocols = LibraryProtocol.objects.filter(obsolete=settings.OBSOLETE).values_list('id', flat=True)
lst = list(obsolete_protocols)
with transaction.atomic():
for id in obsolete_protocols:
LibraryProtocol.objects.filter(id=id).update(obsolete=settings.NON_OBSOLETE)

permission_classes = [IsAdminUser]
queryset = LibraryPreparationCosts.objects.all()
print(queryset.query)

serializer_class = LibraryPreparationCostsSerializer

with transaction.atomic():
for id in obsolete_protocols:
LibraryProtocol.objects.filter(id=id).update(obsolete=settings.OBSOLETE)


class SequencingCostsViewSet(mixins.UpdateModelMixin,
viewsets.ReadOnlyModelViewSet):
Expand Down
2 changes: 0 additions & 2 deletions wui/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,10 @@
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',

'authtools',
'rest_framework',
'django_admin_listfilter_dropdown',
'django_extensions',

'common',
'library_sample_shared',
'library',
Expand Down

0 comments on commit abdac1e

Please sign in to comment.