Skip to content
Snippets Groups Projects

Resolve "Subscription Depletion"

Merged Jan Maximilian Michal requested to merge 92-subscription-depletion into master
1 unresolved thread

Subscription enhancements

  • It is now possible to 'deactivate subscriptions via the delete http verb
  • This is not exactly what was specified in #92 (closed) but should achieve the same result. Instead of introducing a depleted field, subscriptions can distinguish if they are fully depleted or just temporarily. The method does not involve any overhead.
  • Refactorings in the subscription model to increase readability
  • Creating a subscription does not have side effects (creates no assignment)

Other minor changes

  • Assignments are now implicitly checked if feedback is created
  • using the assignment endpoint to create subscriptions instead of subscription endpoint

Migrated everything to UUID fields for primary keys

  • submission_pk -> submission on AssignmentSerializer
  • subscriptions now uniformly use the primary key of a model for the query_key
  • introduced remaining and available fields on subscription
  • query key and type are now validated

Closes #93 (closed) and #92 (closed).

Edited by Jan Maximilian Michal

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
98 93 instance = self.get_object()
99 94
100 95 if instance.is_done:
101 return Response(status=status.HTTP_403_FORBIDDEN) # test
96 return Response(status=status.HTTP_403_FORBIDDEN)
102 97
103 98 instance.delete()
104 return Response(status=status.HTTP_204_NO_CONTENT) # test
99 return Response(status=status.HTTP_204_NO_CONTENT)
100
101 def create(self, request, *args, **kwargs):
102 context = self.get_serializer_context()
103 serializer = AssignmentDetailSerializer(data=request.data,
  • Jan Maximilian Michal resolved all discussions

    resolved all discussions

  • Please register or sign in to reply
    Loading