Skip to content

Commit

Permalink
Changes from review
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Oct 20, 2016
1 parent 691507c commit e4aeb68
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -5,7 +5,7 @@ before_install:
# disable rvm, use system Ruby
- rvm reset
- wget https://raw.githubusercontent.com/yast/yast-devtools/master/travis-tools/travis_setup.sh
- sh ./travis_setup.sh -p "rake yast2-devtools yast2-testsuite yast2 yast2-perl-bindings" -g "rspec:3.3.0 yast-rake gettext"
- sh ./travis_setup.sh -p "rake yast2-devtools yast2-testsuite yast2 yast2-perl-bindings" -g "rspec:3.3.0 yast-rake gettext simplecov coveralls"
script:
- rake check:syntax
- rake check:pot
Expand Down
5 changes: 3 additions & 2 deletions src/include/dhcp-server/widgets.rb
Expand Up @@ -711,10 +711,11 @@ def DNSZonesValidate(_id, _event)
Builtins.regexpmatch(value, "^.*\\.$")
value = Builtins.regexpsub(value, "^(.*)\\.$", "\\1")
end
ip_field = ["zone_ip", "reverse_ip"].include?(w)
# for primary dns ip can be used
valid_ip = ["zone_ip", "reverse_ip"].include?(w) && IP.Check4(value)
valid_ip = ip_field && IP.Check4(value)
# for dns also empty value can be used
default_ip = ["zone_ip", "reverse_ip"].include?(w) && value.empty?
default_ip = ip_field && value.empty?

if !(Hostname.CheckFQ(value) || valid_ip || default_ip)
UI.SetFocus(Id(w))
Expand Down

0 comments on commit e4aeb68

Please sign in to comment.