Commit 55ded5bb authored by Robert's avatar Robert

Added django 2.1 compatibility

parent 0af27ed5
Pipeline #1310 failed with stage
in 2 minutes and 22 seconds
......@@ -77,7 +77,7 @@ def get_parameters(context, **kwargs):
request = context.get('request')
params = request.GET.copy()
for k in kwargs:
params[k] = kwargs.get(k)
params[k] = str(kwargs.get(k))
# drop page parameter in case of parameter changes (#373)
if params != request.GET and 'page' not in kwargs and 'page' in params:
del params['page']
......
......@@ -95,7 +95,7 @@ class AuthenticatedSettings(AuthenticatedMixin, TestCase):
r = self.client.get(email_settings_url)
self.assertEqual(r.status_code, 200)
r = self.client.get(password_settings_url)
self.assertEqual(r.status_code, 302)
self.assertEqual(r.status_code, 200)
def test_delete(self):
delete_url = reverse('delete-gestalt')
......
......@@ -94,7 +94,10 @@ class Update(PermissionMixin, UpdateView):
}
def get_object(self):
return self.request.user.gestalt
if self.request.user.is_authenticated:
return self.request.user.gestalt
else:
return None
def get_success_url(self):
return self.object.get_profile_url()
......
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