Commit 84953f3e authored by Daniel W Bond's avatar Daniel W Bond

removes confirmations/flags if student changes room

parent b6368748
......@@ -3,7 +3,8 @@ from __future__ import absolute_import, print_function
# core django imports
from django.contrib import admin
# imports from your apps
from .models import Student, Major
from .models import Student, Major, Confirmation
admin.site.register(Major)
admin.site.register(Student)
admin.site.register(Confirmation)
......@@ -236,6 +236,7 @@ class UpdateStudent(LoginRequiredMixin, FormValidMessageMixin, FormView):
if current_room != form_room:
me.times_changed_room += 1
Confirmation.objects.filter(student=me).delete()
me.user.first_name = form.data['first_name']
me.user.last_name = form.data['last_name']
......@@ -344,6 +345,7 @@ class WelcomePrivacy(LoginRequiredMixin, UpdateView):
if current_room != form_room:
form.instance.times_changed_room += 1
Confirmation.objects.filter(student=me).delete()
form.instance.completedPrivacy = True
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment