SSHOC / sshoc-marketplace-backend

Code for the backend
Apache License 2.0
2 stars 0 forks source link

Boolean property conflict-at-source is set with wrong value #389

Closed KlausIllmayer closed 10 months ago

KlausIllmayer commented 1 year ago

Boolean property values must be "TRUE" or "FALSE" (it must be uppercase) but currently the property conflict-at-source gets the value true, see https://github.com/SSHOC/sshoc-marketplace-backend/blob/develop/src/main/java/eu/sshopencloud/marketplace/validators/items/ItemFactory.java#L70 - should be changed to TRUE otherwise there are problems when approving such items (usually this property is set after an re-ingestion of an already existing item).

KlausIllmayer commented 11 months ago

The code will now handle new properties conflict-at-source in the right way, setting them to TRUE. But this does not touch the old wrong values with true.

@tparkola How do you prefer to deal with this? Should I update it manually in the database or do we run an update script? The later one is sure the more cleaner way, as it will solve the problem immediately in all instances of the SSHMP when applying the new code and running once the update script.

KlausIllmayer commented 11 months ago

Here is one example: https://marketplace-api.sshopencloud.eu/api/datasets/dp8lau with conflict-at-source=true (you can also see it on stage where the pull request was already applied)

tparkola commented 11 months ago

I agree script is better, coming soon.