Skip to content

Commit

Permalink
Added code to check for nul parent record when get subject source id
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Stevens committed Mar 13, 2015
1 parent b62ca54 commit ed59ef0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion app/models/archon_subject.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ def self.transform(rec)
end

def self.get_source_id(rec)
if rec['SubjectSourceID'] && rec['ParentID'] == '0'
if rec.nil?
# return the ID for local subject source
return 5
elsif rec['SubjectSourceID'] && rec['ParentID'] == '0'
return rec['SubjectSourceID']
else
get_source_id(rec['Parent'])
Expand Down
2 changes: 1 addition & 1 deletion app/views/index.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<h1>Archon Migration Service 1.0.3 (03-06-2015)</h1>
<h1>Archon Migration Service 1.0.3 (03-13-2015)</h1>
<div class="pure-g">
<div id="form-wrapper" class="pure-u-1-2">
<%= ERB.new(File.read(File.dirname(__FILE__)+'/jobs/new.erb')).result(binding) %>
Expand Down

0 comments on commit ed59ef0

Please sign in to comment.