-
Notifications
You must be signed in to change notification settings - Fork 0
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 le bug sur les plantes dans le CompositionStep et les preparations viennent du backend #897
Conversation
|
||
const model = defineModel() | ||
const props = defineProps({ objectType: { type: String } }) | ||
|
||
const plantPartName = computed(() => plantParts.value?.find((x) => x.id === model.value.usedPart)?.name || "Aucune") | ||
const unitName = computed(() => units.value?.find((x) => x.id === model.value.unit)?.name || "") | ||
const preparationName = computed( | ||
() => preparations.value?.find((x) => x.id === parseInt(model.value.preparation))?.name || "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ici, je n'ai pas compris pourquoi l'id (IntegerField) est sérialisé en tant que string.
C'est le cas aussi pour le modèle GalenicFormulation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
La sérialisation backend est bien un integer, mais le input select
du html renvoi toujours un string. Sur cette question SO ça parle du pourquoi on ne peut pas retourner un int d'un select.
Fix #895 et #584