Skip to content

Commit

Permalink
Don't try to process an object we don't have
Browse files Browse the repository at this point in the history
The most likely reason is that we already did it.

We could store the $obj in the cache instead of just the $new_id
but that would use a LOT more memory for little gain.
  • Loading branch information
afresh1 committed Aug 13, 2012
1 parent 828dca5 commit fcc9f5a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rt-ticket-importer
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ sub _ConvertItem {
}
}

return $new_id unless $obj;

foreach my $key (qw( LastUpdatedBy LastUpdated )) {
my $value = $item->{$key} or next;
$value = ConvertUser($value) if $key eq 'LastUpdatedBy';
Expand Down

0 comments on commit fcc9f5a

Please sign in to comment.