Skip to content

Set self href on items and children when adding#294

Merged
matthewhanson merged 4 commits into
developfrom
mah/normalize_on_add
Mar 29, 2021
Merged

Set self href on items and children when adding#294
matthewhanson merged 4 commits into
developfrom
mah/normalize_on_add

Conversation

@matthewhanson
Copy link
Copy Markdown
Member

Related Issue(s): #
#284

Description:
When an existing catalog and an item or child is added to it, the self_href was not set which meant that they had to either be set manually, or a call to normalize_hrefs would be needed. This would also happen if generate_subcatalogs was used....all the subcatalogs and items added will need to be normalized.

However, since the catalog already exists, this should be unnecessary. Given a layout strategy, a self href can be determined and set, if the parent has a self href.

Note the only case where a parent does not have a self href is when the catalog is first created in memory and has not yet been saved. In that case a call to normalize is needed

PR Checklist:

  • Code is formatted (run scripts/format)
  • Tests pass (run scripts/test)
  • This PR maintains or improves overall codebase code coverage.
  • Changes are added to the CHANGELOG. See the docs for information about adding to the changelog.

@matthewhanson matthewhanson merged commit a29705f into develop Mar 29, 2021
@matthewhanson matthewhanson deleted the mah/normalize_on_add branch March 29, 2021 16:34
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