Skip to content
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

Merged
merged 5 commits into from
Nov 29, 2022
Merged

Feature/orebro tsm #1228

merged 5 commits into from
Nov 29, 2022

Conversation

Sunix71
Copy link
Contributor

@Sunix71 Sunix71 commented Nov 1, 2022

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

@Sunix71 Sunix71 self-assigned this Nov 2, 2022
Copy link
Member

@jacobwod jacobwod left a 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"}'
Copy link
Member

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

Copy link
Contributor Author

@Sunix71 Sunix71 Nov 3, 2022

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

@Sunix71 Sunix71 requested a review from jacobwod November 7, 2022 07:08
@jacobwod jacobwod merged commit 802b866 into develop Nov 29, 2022
@jacobwod jacobwod deleted the feature/orebro_tsm branch November 29, 2022 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants