Fixed bugs: Refactored method calls didn't work as expected.
This commit is contained in:
parent
2fc1e1c313
commit
6887e72ac9
1 changed files with 2 additions and 2 deletions
|
@ -564,7 +564,7 @@ module Import::OTRS
|
||||||
end
|
end
|
||||||
|
|
||||||
# update or create ticket
|
# update or create ticket
|
||||||
ticket_old = Ticket.find(ticket_new[:id])
|
ticket_old = Ticket.find_by(id: ticket_new[:id])
|
||||||
if ticket_old
|
if ticket_old
|
||||||
log "update Ticket.find(#{ticket_new[:id]})"
|
log "update Ticket.find(#{ticket_new[:id]})"
|
||||||
ticket_old.update_attributes(ticket_new)
|
ticket_old.update_attributes(ticket_new)
|
||||||
|
@ -787,7 +787,7 @@ module Import::OTRS
|
||||||
created_at: history['CreateTime'],
|
created_at: history['CreateTime'],
|
||||||
created_by_id: history['CreateBy']
|
created_by_id: history['CreateBy']
|
||||||
)
|
)
|
||||||
elsif history['ArticleID'] && !history['ArticleID'].zero?
|
elsif history['ArticleID'] && !history['ArticleID'].to_i.zero?
|
||||||
History.add(
|
History.add(
|
||||||
id: history['HistoryID'],
|
id: history['HistoryID'],
|
||||||
o_id: history['ArticleID'],
|
o_id: history['ArticleID'],
|
||||||
|
|
Loading…
Reference in a new issue