PASTAplus / ezEML

A web front-end for the metapype-eml client
Apache License 2.0
7 stars 8 forks source link

Keyword duplication should be suppressed #148

Closed jon-ide closed 11 months ago

jon-ide commented 11 months ago

If you add or import the same keyword repeatedly, you should only get one instance of the keyword.

jon-ide commented 11 months ago

The code that consolidates keyword sets and removes duplicates was failing after doing a fetch from EDI if the fetch included the data tables. This was for a suprisingly subtle reason that had nothing directly to do with keywords. The function reload_metadata() that updates the Check Metadata badge, updates the eml_node reference, so if callers were not capturing the returned eml_node, subsequent code in Metapype that depends on nodes having the same identity as the corresponding nodes in the Metapype store (e.g., remove_child) would fail. Go figure.