Internal Server Error: /lydia/confirm
Traceback (most recent call last):
File "/home/sde/prod/.venv/lib/python3.8/site-packages/django/db/models/query.py", line 554, in update_or_create
obj = self.select_for_update().get(**kwargs)
File "/home/sde/prod/.venv/lib/python3.8/site-packages/django/db/models/query.py", line 406, in get
raise self.model.DoesNotExist(
bde.models.Contributor.DoesNotExist: Contributor matching query does not exist.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/sde/prod/.venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
psycopg2.errors.StringDataRightTruncation: value too long for type character varying(5)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/sde/prod/.venv/lib/python3.8/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/home/sde/prod/.venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/home/sde/prod/.venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/sde/prod/.venv/lib/python3.8/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "./lydia/views.py", line 83, in confirm
return _process_lydia_response(
File "./lydia/views.py", line 75, in _process_lydia_response
r.save()
File "/home/sde/prod/.venv/lib/python3.8/site-packages/django/db/models/base.py", line 740, in save
self.save_base(using=using, force_insert=force_insert,
File "/home/sde/prod/.venv/lib/python3.8/site-packages/django/db/models/base.py", line 764, in save_base
pre_save.send(
File "/home/sde/prod/.venv/lib/python3.8/site-packages/django/dispatch/dispatcher.py", line 173, in send
return [
File "/home/sde/prod/.venv/lib/python3.8/site-packages/django/dispatch/dispatcher.py", line 174, in <listcomp>
(receiver, receiver(signal=self, sender=sender, **named))
File "./boutique/models.py", line 419, in mark_payment_as_paid
payment.order.post_payment()
File "./boutique/models.py", line 196, in post_payment
orderitem.post_payment()
File "./boutique/models.py", line 293, in post_payment
self.item.post_payment(self)
File "./boutique/models.py", line 121, in full_cotiz_action
Contributor.take_full_contribution(user, mean)
File "./bde/models.py", line 54, in take_full_contribution
return Contributor.objects.update_or_create(
File "/home/sde/prod/.venv/lib/python3.8/site-packages/django/db/models/manager.py", line 82, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/home/sde/prod/.venv/lib/python3.8/site-packages/django/db/models/query.py", line 559, in update_or_create
obj, created = self._create_object_from_params(kwargs, params, lock=True)
File "/home/sde/prod/.venv/lib/python3.8/site-packages/django/db/models/query.py", line 575, in _create_object_from_params
obj = self.create(**params)
File "/home/sde/prod/.venv/lib/python3.8/site-packages/django/db/models/query.py", line 422, in create
obj.save(force_insert=True, using=self.db)
File "/home/sde/prod/.venv/lib/python3.8/site-packages/django/db/models/base.py", line 740, in save
self.save_base(using=using, force_insert=force_insert,
File "/home/sde/prod/.venv/lib/python3.8/site-packages/django/db/models/base.py", line 777, in save_base
updated = self._save_table(
File "/home/sde/prod/.venv/lib/python3.8/site-packages/django/db/models/base.py", line 870, in _save_table
result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
File "/home/sde/prod/.venv/lib/python3.8/site-packages/django/db/models/base.py", line 907, in _do_insert
return manager._insert([self], fields=fields, return_id=update_pk,
File "/home/sde/prod/.venv/lib/python3.8/site-packages/django/db/models/manager.py", line 82, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/home/sde/prod/.venv/lib/python3.8/site-packages/django/db/models/query.py", line 1186, in _insert
return query.get_compiler(using=using).execute_sql(return_id)
File "/home/sde/prod/.venv/lib/python3.8/site-packages/django/db/models/sql/compiler.py", line 1375, in execute_sql
cursor.execute(sql, params)
File "/home/sde/prod/.venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 67, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/home/sde/prod/.venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 76, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/home/sde/prod/.venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/home/sde/prod/.venv/lib/python3.8/site-packages/django/db/utils.py", line 89, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/home/sde/prod/.venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
django.db.utils.DataError: value too long for type character varying(5)