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

Fix location from ingested items display #697

Merged

Conversation

thecalcc
Copy link
Contributor

@thecalcc thecalcc commented Dec 12, 2023

STTNHUB-187

Checklist

  • This pull request is not adding new forms that use redux
  • This pull request is adding missing TypeScript types to modified code segments where it's easy to do so with confidence
  • This pull request is replacing lodash.get with optional chaining for modified code segments

@thecalcc
Copy link
Contributor Author

Mapped & trimmed strings so all strings are consistent after joining.

BEFORE:
image

AFTER:
image

@petrjasek petrjasek added this to the v2.6 milestone Dec 12, 2023
get(item, 'location.0.address.postal_code'),
get(item, 'location.0.address.country'),
].filter((d: any) => d).join(', ');
const location = item.location?.[0];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar changes would need to be done on the back-end too: https://github.com/superdesk/newsroom-core/blob/develop/newsroom/utils.py#L217 (this is mainly for emails)

@thecalcc thecalcc merged commit 6a14585 into superdesk:develop Dec 13, 2023
7 checks passed
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.

4 participants