Closed aaboffill closed 7 years ago
@aaboffill I found a bug: when I tried to change a client's status in the modal window, I had an error:
web_1 | [30/Mar/2017 16:13:43] "POST /member/client/100/status/scheduler HTTP/1.1" 500 14495
web_1 | Internal Server Error: /member/client/100/status/scheduler
web_1 | Traceback (most recent call last):
web_1 | File "/usr/local/lib/python3.5/site-packages/django/core/handlers/exception.py", line 42, in inner
web_1 | response = get_response(request)
web_1 | File "/usr/local/lib/python3.5/site-packages/django/core/handlers/base.py", line 187, in _get_response
web_1 | response = self.process_exception_by_middleware(e, request)
web_1 | File "/usr/local/lib/python3.5/site-packages/django/core/handlers/base.py", line 185, in _get_response
web_1 | response = wrapped_callback(request, *callback_args, **callback_kwargs)
web_1 | File "/usr/local/lib/python3.5/site-packages/django/views/generic/base.py", line 68, in view
web_1 | return self.dispatch(request, *args, **kwargs)
web_1 | File "/usr/local/lib/python3.5/site-packages/django/utils/decorators.py", line 67, in _wrapper
web_1 | return bound_func(*args, **kwargs)
web_1 | File "/usr/local/lib/python3.5/site-packages/django/contrib/auth/decorators.py", line 23, in _wrapped_view
web_1 | return view_func(request, *args, **kwargs)
web_1 | File "/usr/local/lib/python3.5/site-packages/django/utils/decorators.py", line 63, in bound_func
web_1 | return func.__get__(self, type(self))(*args2, **kwargs2)
web_1 | File "/code/src/member/views.py", line 1420, in dispatch
web_1 | return super(ClientStatusScheduler, self).dispatch(*args, **kwargs)
web_1 | File "/usr/local/lib/python3.5/site-packages/django/contrib/auth/mixins.py", line 56, in dispatch
web_1 | return super(LoginRequiredMixin, self).dispatch(request, *args, **kwargs)
web_1 | File "/usr/local/lib/python3.5/site-packages/django/contrib/auth/mixins.py", line 92, in dispatch
web_1 | return super(PermissionRequiredMixin, self).dispatch(request, *args, **kwargs)
web_1 | File "/usr/local/lib/python3.5/site-packages/django/views/generic/base.py", line 88, in dispatch
web_1 | return handler(request, *args, **kwargs)
web_1 | File "/usr/local/lib/python3.5/site-packages/django/views/generic/edit.py", line 217, in post
web_1 | return super(BaseCreateView, self).post(request, *args, **kwargs)
web_1 | File "/usr/local/lib/python3.5/site-packages/django/views/generic/edit.py", line 183, in post
web_1 | return self.form_valid(form)
web_1 | File "/code/src/member/views.py", line 1439, in form_valid
web_1 | response = super(ClientStatusScheduler, self).form_valid(form)
web_1 | File "/code/src/order/mixins.py", line 26, in form_valid
web_1 | response = super(FormValidAjaxableResponseMixin, self).form_valid(form)
web_1 | File "/usr/local/lib/python3.5/site-packages/django/views/generic/edit.py", line 162, in form_valid
web_1 | self.object = form.save()
web_1 | File "/code/src/member/forms.py", line 511, in save
web_1 | self.object.process()
web_1 | AttributeError: 'ClientScheduledStatusForm' object has no attribute 'object'
Do you have the same error?
Fixes # aaboffill
Changes proposed in this pull request:
ForeignKey
relationship betweenClientScheduledStatus
class toOneToOneField
, and to handle this relations as apair
Status
How to verify this change
Client
details and select the linkStatus
.Remove
Deployment notes and migration
New translatable strings