Skip to content

Incorrect Reference "department" in request model #144

Open
@MoD01

Description

@MoD01

There is something odd with the "department" field in the Requests model.

information about test parameter:

  • role= django superadmin
  • database = MSSQL (I know it is not compatible with MSSQL officially but I am working on it)

How to reproduce the bug:

Image - this leads me to /en/456-admin/auth/group/add/?_to_field=id&_popup=1

? is it correct that the "department" i a "group"?

  • fill the fields with examplary data like that and save:
Image

This results in this:

Image
  • click save at the request web form. This results in an error message and an empty value of the department field.
Image

FYI:
the department field is not part of the requests model but the inherited model Base1. There department is defined like this:

department = models.ForeignKey(
    'auth.Group',
    blank=True,
    null=True,
    on_delete=models.CASCADE,
    verbose_name=_("Department"),
    related_name="%(app_label)s_%(class)s_department_related",
)

is it even required to have department as an mandatory field in request model (in Base1 it is marked as null=True)?

PS: maybe it is an MSSQL problem? MSSQL is not capable of doing database-side regular expressions. I already transferred one on python side to make it compatible. Maybe department also uses regular expressions to filter?

PPS: I think it is a permission problem. I had a superuser with blank groups and permissions. Now I added every permission to my user and now I see something in the departments dropdown.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions