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

apply_change_to_project: Fix removal of simple value that's nil already. #16

Merged
merged 1 commit into from
Jul 11, 2021

Conversation

byohay
Copy link
Collaborator

@byohay byohay commented Jul 11, 2021

If the applied change removed a value and the existing value is
different from the removed value, it is considered a conflict.
However, this is not true in the case the existing value was already
removed.

In addition, improve messages in case of real conflicts when dealing
with removal of simple attributes.

@byohay byohay linked an issue Jul 11, 2021 that may be closed by this pull request
Copy link
Contributor

@ashdnazg ashdnazg left a comment

Choose a reason for hiding this comment

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

F&S&M

@@ -218,7 +219,7 @@ def apply_addition_to_simple_attribute(old_value, change)
new_value = old_value.merge(change)

unless (old_value.to_a - new_value.to_a).empty?
raise "New hash #{change} contains values that conflict with old hash #{old_value}"
raise "New hash #{change} contains values that conflicts with old hash #{old_value}"
Copy link
Contributor

Choose a reason for hiding this comment

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

values is plural, so conflict is correct

If the applied change removed a value and the existing value is
different from the removed value, it is considered a conflict.
However, this is not true in the case the existing value was already
removed.

In addition, improve messages in case of real conflicts when dealing
with removal of simple attributes.
@byohay byohay force-pushed the feature/kintsugi-removal-raise branch from 0a07723 to 7c417ec Compare July 11, 2021 11:42
@byohay byohay merged commit 9cce7eb into Lightricks:main Jul 11, 2021
@byohay byohay deleted the feature/kintsugi-removal-raise branch July 11, 2021 11:43
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.

Runtime error
2 participants