Merge branch 'fix-gdc' into 'develop'

fix: 🐛 error on dynamic page create and error with fields unique by parent

See merge request ldc-web/projets/ldc!174
This commit is contained in:
Karl M'muller 2026-07-02 12:45:34 +00:00
commit fc8d4a3d00
2 changed files with 2 additions and 4 deletions

View file

@ -97,7 +97,7 @@ class TranslationHelper
->whereKeyNot($model->getKey())
->whereRaw("JSON_SEARCH(`{$dbAttribute}`, 'one', ?) IS NOT NULL", [$value]);
if ($anotherDbAttribute !== null && $anotherValue !== null) {
if ($anotherDbAttribute !== null) {
$query->where($anotherDbAttribute, $anotherValue);
}
if ($query->exists()) {

View file

@ -253,9 +253,7 @@ export default function Form({
modelName={useTrans(`models.classes.${modelName}`, {
choice: 1,
})}
pathField={data.isRoot ? "" : dynamicPageUrl
.replace(url, "")
.replace(/^\/+/, "")}
pathField={data.isRoot ? "" : (dynamicPageUrl ?? "").replace(url, "").replace(/^\/+/, "")}
isAvailable={
model?.status ===
enumDynamicPageStatus.published.value