IntegrityError at /landing/signup/ insert or update on table "analytics_signup_attempt" violates foreign key constraint "analytics_signup_att_tenant_id_e24c8827_fk_tenants_t" DETAIL: Key (tenant_id)=(4a1acdc6-ee26-4976-a5cd-fd409666dead) is not present in table "tenants_tenant". Request Method: POST Request URL: http://a85aef78-3539-414f-9908-8fe0c12d570b-00-3ed8ao1wbx9ms.riker.replit.dev/landing/signup/ Django Version: 5.2.6 Exception Type: IntegrityError Exception Value: insert or update on table "analytics_signup_attempt" violates foreign key constraint "analytics_signup_att_tenant_id_e24c8827_fk_tenants_t" DETAIL: Key (tenant_id)=(4a1acdc6-ee26-4976-a5cd-fd409666dead) is not present in table "tenants_tenant". Exception Location: /home/runner/workspace/.pythonlibs/lib/python3.11/site-packages/django/db/backends/utils.py, line 105, in _execute Raised during: landing.views.tenant_signup Python Executable: /home/runner/workspace/.pythonlibs/bin/python Python Version: 3.11.13 Python Path: ['/home/runner/workspace', '/nix/store/zz7i75jb78idaz0rb1y1i4rzdyxq28vf-sitecustomize/lib/python/site-packages', '/nix/store/yaps09f01jp3fd1405qlr0qz6haf6z03-python3.11-pip-25.0.1/lib/python3.11/site-packages', '/nix/store/7d088dip86hlzri9sk0h78b63yfmx0a0-python3-3.11.13/lib/python311.zip', '/nix/store/7d088dip86hlzri9sk0h78b63yfmx0a0-python3-3.11.13/lib/python3.11', '/nix/store/7d088dip86hlzri9sk0h78b63yfmx0a0-python3-3.11.13/lib/python3.11/lib-dynload', '/home/runner/workspace/.pythonlibs/lib/python3.11/site-packages', '/nix/store/7d088dip86hlzri9sk0h78b63yfmx0a0-python3-3.11.13/lib/python3.11/site-packages', '/home/runner/workspace/.pythonlibs/lib/python3.11/site-packages', '/nix/store/y0iwy8ma2m45pr23bw4r7lyz69v2b6wf-python3.11-setuptools-80.7.1/lib/python3.11/site-packages'] Server time: Thu, 11 Sep 2025 21:07:24 +0300 Traceback Switch to copy-and-paste view /home/runner/workspace/.pythonlibs/lib/python3.11/site-packages/django/contrib/auth/__init__.py, line 57, in _get_backend_from_user backend = backend or user.backend ^^^^^^^^^^^^ … Local vars During handling of the above exception ('User' object has no attribute 'backend'), another exception occurred: /home/runner/workspace/landing/views.py, line 207, in tenant_signup login(request, user) ^^^^^^^^^^^^^^^^^^^^ … Local vars /home/runner/workspace/.pythonlibs/lib/python3.11/site-packages/django/contrib/auth/__init__.py, line 189, in login backend = _get_backend_from_user(user=user, backend=backend) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ … Local vars /home/runner/workspace/.pythonlibs/lib/python3.11/site-packages/django/contrib/auth/__init__.py, line 63, in _get_backend_from_user raise ValueError( ^ … Local vars During handling of the above exception (You have multiple authentication backends configured and therefore must provide the `backend` argument or set the `backend` attribute on the user.), another exception occurred: /home/runner/workspace/.pythonlibs/lib/python3.11/site-packages/django/db/backends/utils.py, line 105, in _execute return self.cursor.execute(sql, params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ … Local vars The above exception (insert or update on table "analytics_signup_attempt" violates foreign key constraint "analytics_signup_att_tenant_id_e24c8827_fk_tenants_t" DETAIL: Key (tenant_id)=(4a1acdc6-ee26-4976-a5cd-fd409666dead) is not present in table "tenants_tenant". ) was the direct cause of the following exception: /home/runner/workspace/.pythonlibs/lib/python3.11/site-packages/django/core/handlers/exception.py, line 55, in inner response = get_response(request) ^^^^^^^^^^^^^^^^^^^^^ … Local vars /home/runner/workspace/.pythonlibs/lib/python3.11/site-packages/django/core/handlers/base.py, line 197, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ … Local vars /home/runner/workspace/landing/views.py, line 214, in tenant_signup signup_attempt.save() ^^^^^^^^^^^^^^^^^^^^^