Skip to content

Conversation

@kofrezo
Copy link
Contributor

@kofrezo kofrezo commented Feb 10, 2026

It is currently only possible to select one or none (all) target servertype for attribtues of type relation, supernet and domain.

We have a use case where we want to allow some servertypes as target but not all.

  • serverdb.models.Attribute: Replace FK with ManyToManyField
  • serverdb.sql_generator: Replace '=' with 'IN' operator
  • serverdb.query_materializer: Replace '=' with 'ANY' operator
  • serverdb.query_materializer: Use Django '__in' instead of '=' for ORM
  • serverdb.admin: Add filter_horizontal widget, remove from readonly_fields
  • serverdb.admin: Explain what happens if no servertype is selected
  • serverdb.forms: Adapt validation from is-not-None to queryset .exists()
  • Add migration to adjust schema and migrate existing data
  • Adjust fixtures for tests
  • Adjust db/integrity.sql: Updated to query M2M join table (likely orphaned)

It is currently only possible to select one or none (all) target servertype
for attribtues of type relation, supernet and domain.

We have a use case where we want to allow some servertypes as target but
not all.

- serverdb.models.Attribute: Replace FK with ManyToManyField
- serverdb.sql_generator: Replace '=' with 'IN' operator
- serverdb.query_materializer: Replace '=' with 'ANY' operator
- serverdb.query_materializer: Use Django '__in' instead of '=' for ORM
- serverdb.admin: Add filter_horizontal widget, remove from readonly_fields
- serverdb.admin: Explain what happens if no servertype is selected
- serverdb.forms: Adapt validation from is-not-None to queryset .exists()
- Add migration to adjust schema and migrate existing data
- Adjust fixtures for tests
- Adjust db/integrity.sql: Updated to query M2M join table (likely orphaned)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant