Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/zdavatz/oddb.org
Browse files Browse the repository at this point in the history
  • Loading branch information
zdavatz committed Nov 16, 2024
2 parents 5d81801 + f2b2bf3 commit 9aab89f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,13 @@ GEM
rake (13.0.6)
rbs (2.0.0)
rclconf (1.0.0)
rdoc (6.6.2)
rdoc (6.6.3.1)
psych (>= 4.0.0)
regexp_parser (2.9.0)
reline (0.4.3)
io-console (~> 0.5)
rexml (3.2.6)
rexml (3.3.3)
strscan
rmagick (4.2.4)
rspec (3.10.0)
rspec-core (~> 3.10.0)
Expand Down Expand Up @@ -229,7 +230,7 @@ GEM
rubocop (= 1.24.1)
rubocop-performance (= 1.13.1)
stringio (3.1.0)
strscan (3.0.1)
strscan (3.1.0)
swissmedic-diff (0.2.8)
nokogiri
rubyXL (>= 3.3.1)
Expand Down
8 changes: 8 additions & 0 deletions src/model/sequence.rb
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,14 @@ def galenic_forms
}.compact.uniq
end
def has_patinfo?
# There are bad records in the database, that despite odba's class saying it's a Patinfo,
# it's actually a PatinfoDocument. Probably a bug in ODBA.
# https://github.com/zdavatz/oddb.org/issues/280
if !@patinfo.nil? && @patinfo.respond_to?(:odba_instance) && !@patinfo.odba_instance.is_a?(ODDB::Patinfo)
@patinfo = nil
odba_store
return false
end
((!@patinfo.nil? and @patinfo.valid?) || !@pdf_patinfo.nil?) \
&& patinfo_active? \
&& (company && !company.disable_patinfo)
Expand Down

0 comments on commit 9aab89f

Please sign in to comment.