Skip to content

Commit

Permalink
Fixing value conversion in BookPresentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Schyska committed Feb 17, 2012
1 parent b13b88f commit 1e63101
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def author_first_name_setter

data_adapter = Netzke::Basepack::DataAdapters::AbstractAdapter.adapter_class(Author).new(Author)
# cast v to integer, if possible
v = v.to_i unless v.match(/[^[:digit:]]+/)
v = v.to_i unless !v.kind_of? String || v.match(/[^[:digit:]]+/)
if v.is_a?(Integer)
r.author = data_adapter.find_record(v)
else
Expand Down

0 comments on commit 1e63101

Please sign in to comment.