directus-labs / directus-template-cli

Apply "templates" to a new, empty Directus project.
MIT License
88 stars 15 forks source link

Issues when the PK isn't "id" #42

Closed Jbmanllr closed 6 months ago

Jbmanllr commented 11 months ago

For languages collection for example, PK is "code", well the content loader doesn't load any language provided, therefore the entirety of the app content isn't loaded because translations can't find related language entry.

bryantgillespie commented 11 months ago

I'm assuming this when you try to use your own templates?

Makes sense because we actually have id hardcoded here.

https://github.com/directus-community/directus-template-cli/blob/abef5c030ab841a7b22b1534c58042ec042f12d4/src/lib/load/load-data.ts#L29C9-L44C12

Jbmanllr commented 11 months ago

yes, considered its the languages collection created by directus itself i though it was worth accounting for it as an issue that should be looked into.

Any short term workaround?

bryantgillespie commented 11 months ago

Any short term workaround?

Hmmm. As in right now? Probably just manually creating it.

Will try to review and get a fix within the next week or two.

Jbmanllr commented 11 months ago

ok well ill wait a week or two then :) thanks, looking forward to it !

bryantgillespie commented 6 months ago

Marking as closed since this was resolved in a previous release.