Skip to content
Snippets Groups Projects

Prevent empty WorkerConfiguration names

Merged Erwan Rouchet requested to merge non-empty-config-name into master

Closes #1808 (closed)

I first tried adding a MinLengthValidator, but its validation does not apply when creating instances with the ORM directly; this only impacts the API (which already enforced non-empty config names) and the Django admin (same, since it does not have blank=True). I left it there because it doesn't cause any trouble, and added a CHECK constraint instead, which is the only way to really ensure names cannot be empty.

I spent some time analyzing every other text field and found many other cases where they could be empty. For example, ImageServer.objects.create() works just fine, and creates a server with no name and no URL. I will file issues to deal with that later.

Merge request reports

Checking pipeline status.

Approval is optional

Merged by Bastien AbadieBastien Abadie 9 months ago (Jul 18, 2024 9:50am UTC)

Merge details

  • Changes merged into master with 3bdb1a1f (commits were squashed).
  • Deleted the source branch.
  • Auto-merge enabled

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading