projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
21304: Check for nil from set_initial_username
[arvados.git]
/
services
/
api
/
lib
/
tasks
/
manage_long_lived_tokens.rake
diff --git
a/services/api/lib/tasks/manage_long_lived_tokens.rake
b/services/api/lib/tasks/manage_long_lived_tokens.rake
index d83c2b6030e1e7cc12f6ad4902bda1d13624e756..70a0f242848a9c6a143f3120b520cb534e90bb0c 100644
(file)
--- a/
services/api/lib/tasks/manage_long_lived_tokens.rake
+++ b/
services/api/lib/tasks/manage_long_lived_tokens.rake
@@
-29,9
+29,9
@@
namespace :db do
# skip this token
next
end
# skip this token
next
end
- if (auth.user.uuid =~ /-tpzed-000000000000000/).nil?
+ if (auth.user.uuid =~ /-tpzed-000000000000000/).nil?
and (auth.user.uuid =~ /-tpzed-anonymouspublic/).nil?
CurrentApiClientHelper.act_as_system_user do
CurrentApiClientHelper.act_as_system_user do
- auth.update
_attributes
!(expires_at: exp_date)
+ auth.update!(expires_at: exp_date)
end
token_count += 1
end
end
token_count += 1
end
@@
-58,7
+58,7
@@
namespace :db do
# skip this token
next
end
# skip this token
next
end
- if not auth.user.nil? and (auth.user.uuid =~ /-tpzed-000000000000000/).nil?
+ if not auth.user.nil? and (auth.user.uuid =~ /-tpzed-000000000000000/).nil?
and (auth.user.uuid =~ /-tpzed-anonymouspublic/).nil?
user_ids.add(auth.user_id)
token_count += 1
end
user_ids.add(auth.user_id)
token_count += 1
end