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

fix(apis_entities): disable create_default_uri during fixture loading #1480

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

b1rger
Copy link
Contributor

@b1rger b1rger commented Dec 5, 2024

Fixtures should contain all the data anyway, so the automatic creation
of the default uri should be skipped.

Closes: #1473

Fixtures should contain all the data anyway, so the automatic creation
of the default uri should be skipped.

Closes: #1473
@b1rger b1rger marked this pull request as ready for review December 5, 2024 11:24
@b1rger b1rger requested a review from gythaogg December 5, 2024 11:24
Copy link
Contributor

@gythaogg gythaogg left a comment

Choose a reason for hiding this comment

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

Potentially we could also use CREATE_DEFAULT_URI = False in settings_loaddata.py? This definitely prevents the (orphan) URI objects from being created by default. Still unsure why URIs when created while importing data are not connected to the entities.

I am just wondering if it's a good idea to shut down the possibility of automatic URI creation when using fixture - when we provide two options to turn them on/off via settings (CREATE_DEFAULT_URI) and data (attribute skip_default_uri).

Just saw #1473 (comment); so let's go with this fix!

@b1rger b1rger merged commit f604816 into main Dec 6, 2024
14 checks passed
@b1rger b1rger deleted the birger/1473-no-uri-create-fixture branch December 6, 2024 09:07
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.

sample_project: URIs are created but not linked with the entities
2 participants