Skip to content

Commit

Permalink
Merge pull request #837 from yast/bug_1109812
Browse files Browse the repository at this point in the history
Do not modify the value if it is the same.
  • Loading branch information
teclator committed Oct 1, 2018
2 parents ecad7e8 + bcc3380 commit 7773623
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions library/network/src/lib/y2firewall/firewalld/relations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ def has_attributes(*attributes, scope: nil, cache: false) # rubocop:disable Styl
attr_reader attribute

define_method "#{attribute}=" do |item|
return item if public_send(attribute) == item
instance_variable_set("@#{attribute}", item)

modified!(attribute) if cache
Expand Down Expand Up @@ -183,6 +184,7 @@ def has_many(*relations, scope: nil, cache: false) # rubocop:disable Style/Predi
attr_reader relation

define_method "#{relation}=" do |item|
return item if public_send(relation) == item
instance_variable_set("@#{relation}", item)

modified!(relation) if cache
Expand Down
7 changes: 7 additions & 0 deletions package/yast2.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri Sep 28 08:05:15 UTC 2018 - knut.anderssen@suse.com

- Y2Firewall::Firewalld: Single attributes setter will not modify
the value of the attribute in case it is the same (bsc#1109812)
- 4.0.97

-------------------------------------------------------------------
Wed Sep 19 13:36:40 UTC 2018 - igonzalezsosa@suse.com

Expand Down
2 changes: 1 addition & 1 deletion package/yast2.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: yast2
Version: 4.0.96
Version: 4.0.97
Release: 0
Summary: YaST2 - Main Package
License: GPL-2.0-only
Expand Down

0 comments on commit 7773623

Please sign in to comment.