Skip to content

Commit

Permalink
Remove / from uri_path in factories
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenklar committed Jul 2, 2024
1 parent 171ffab commit cb79c37
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion rdmo/management/assets/js/factories/OptionsFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class OptionsFactory {
return {
model: 'options.option',
uri_prefix: config.settings.default_uri_prefix,
uri_path: parent.optionset ? `${parent.optionset.uri_path}/`: '',
uri_path: parent.optionset ? parent.optionset.uri_path : '',
optionsets: parent.optionset ? [parent.optionset.id] : [],
conditions: [],
editors: config.settings.multisite ? [config.currentSite.id] : [],
Expand Down
12 changes: 6 additions & 6 deletions rdmo/management/assets/js/factories/QuestionsFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class QuestionsFactory {
return {
model: 'questions.section',
uri_prefix: config.settings.default_uri_prefix,
uri_path: parent.catalog ? `${parent.catalog.uri_path}/`: '',
uri_path: parent.catalog ? parent.catalog.uri_path : '',
catalogs: parent.catalog ? [parent.catalog.id] : [],
pages: [],
editors: config.settings.multisite ? [config.currentSite.id] : [],
Expand All @@ -26,7 +26,7 @@ class QuestionsFactory {
return {
model: 'questions.page',
uri_prefix: config.settings.default_uri_prefix,
uri_path: parent.section ? `${parent.section.uri_path}/`: '',
uri_path: parent.section ? parent.section.uri_path : '',
sections: parent.section ? [parent.section.id] : [],
questionsets: [],
questions: [],
Expand All @@ -38,8 +38,8 @@ class QuestionsFactory {
return {
model: 'questions.questionset',
uri_prefix: config.settings.default_uri_prefix,
uri_path: parent.page ? `${parent.page.uri_path}/`: (
parent.questionset ? `${parent.questionset.uri_path}/`: ''
uri_path: parent.page ? parent.page.uri_path : (
parent.questionset ? parent.questionset.uri_path : ''
),
pages: parent.page ? [parent.page.id] : [],
parents: parent.questionset ? [parent.questionset.id] : [],
Expand All @@ -53,8 +53,8 @@ class QuestionsFactory {
return {
model: 'questions.question',
uri_prefix: config.settings.default_uri_prefix,
uri_path: parent.page ? `${parent.page.uri_path}/`: (
parent.questionset ? `${parent.questionset.uri_path}/`: ''
uri_path: parent.page ? parent.page.uri_path : (
parent.questionset ? parent.questionset.uri_path : ''
),
widget_type: 'text',
value_type: 'text',
Expand Down

0 comments on commit cb79c37

Please sign in to comment.