This commit is contained in:
BoHung Chiu 2021-04-27 16:23:15 +08:00
parent f757fd01f7
commit b75b2e9af2
1 changed files with 7 additions and 12 deletions

View File

@ -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