-
Notifications
You must be signed in to change notification settings - Fork 48
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
Feature/orebro tsm #1228
Feature/orebro tsm #1228
Conversation
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.
I'm not sure this simple fix is sufficient to close #987 but perhaps it's a step in the right direction.
In addition, please see comment in code.
featureProps[field.name] || field.defaultValue || ""; | ||
//Object that returns as a string results in [object] [Object] | ||
if ( | ||
JSON.stringify(featureProps[field.name]) === '{"xsi:nil":"true"}' |
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.
To be honest, I don't see why you compare a stringified object, instead of just
featureProps[field.name]?.["xsi:nil"] === true
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.
I'll write like this then:
featureProps[field.name]?.["xsi:nil"] === "true"
? (valueMap[field.name] = "")
: (valueMap[field.name] =
featureProps[field.name] || field.defaultValue || "");
Then it seems to work
Pushed
Issue: #987
QGIS server returns object that is not empty. HAJK prints out object as string which returns Object Object in fields (text och siffra).
Filename: AttributeEditor.js in new-client/src/plugins/Edit/components