Skip to content

ALLOCATION_RESOURCE_ORDERING setting is not configurable using settings with Django #714

@Eric-Butcher

Description

@Eric-Butcher

There is a setting constant used called ALLOCATION_RESOURCE_ORDERING that is used in the coldfront.core.allocation.models.py module. This constant is instantiated using ALLOCATION_RESOURCE_ORDERING = import_from_settings("ALLOCATION_RESOURCE_ORDERING", ["-is_allocatable", "name"]) at the top of the module which loads the default values if the setting is not set using Django settings. However this value will never be set using Django settings because there is no place in the coldfront settings configuration where this setting variable is initialized. This means that even if a user manually sets an environment variable to override this, it will never take into effect. A user could only set this as a custom setting by manually modifying the source code to introduce this as a variable in the settings files. This setting name does appear in the documentation.

This issue is related to #708.

This could be fixed by either adding ALLOCATION_RESOURCE_ORDERING to a coldfront django settings file or by simply removing this feature altogether since it is currently not being used anyways.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions