Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix er/make experiment slug unique #1366

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

Evert-R
Copy link
Contributor

@Evert-R Evert-R commented Nov 15, 2024

This PR sets the slug field on the Experiment model to be unique.

First the slug data gets migrated to a temporary field, then the original slug field is deleted, after which the temporary slug is renamed to slug.

Directly changing the slug field with unique=True didn't work, in every which way i tried, even when no experiments were present in the database.

closes: #1352

Copy link
Collaborator

@BeritJanssen BeritJanssen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I do think you might be able to squash the migrations, so it's just one file?

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.

BUG - Duplicates are possible for Experiment.slug
2 participants