Fix bug.
This commit is contained in:
parent
f757fd01f7
commit
b75b2e9af2
|
@ -34,14 +34,11 @@ module NtnuSyncPlugin
|
|||
|
||||
if invalid_apa_title.include? apa_title
|
||||
jp.delete
|
||||
jp = JournalPaper.new
|
||||
jp.paper_title_translations = { 'zh_tw' => nil, 'en' => nil }
|
||||
jp.year = publication_year
|
||||
else
|
||||
jp.publication_date = "#{publication_year}/#{publication_month}/01"
|
||||
jp.member_profile_id = user.member_profile_id
|
||||
puts "journal paper #{jp.id} saved" if jp.save
|
||||
end
|
||||
|
||||
jp.publication_date = "#{publication_year}/#{publication_month}/01"
|
||||
jp.member_profile_id = user.member_profile_id
|
||||
puts "journal paper #{jp.id} saved" if jp.save
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -97,12 +94,10 @@ module NtnuSyncPlugin
|
|||
|
||||
if invalid_apa_title.include? apa_title
|
||||
wc.delete
|
||||
wc = WritingConference.new
|
||||
wc.paper_title_translations = { 'zh_tw' => nil, 'en' => nil }
|
||||
else
|
||||
wc.member_profile_id = user.member_profile_id
|
||||
puts "conference paper #{wc.id} saved" if wc.save
|
||||
end
|
||||
|
||||
wc.member_profile_id = user.member_profile_id
|
||||
puts "conference paper #{wc.id} saved" if wc.save
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue