Improved OTRS import role sync check to reduce SQL queries.

This commit is contained in:
Thorsten Eckel 2017-03-28 14:30:16 +02:00
parent a6c3f55844
commit ed6cca8021

View file

@ -38,7 +38,7 @@ module Import
return false if !@local_user
# only update roles if different (reduce sql statements)
if @local_user.role_ids == user[:role_ids]
if user[:role_ids] && user[:role_ids].sort == @local_user.role_ids.sort
user.delete(:role_ids)
end