14873: Fixes unit tests.
[arvados.git] / services / api / app / models / group.rb
index 7a7f0a3a600643cd43afe4d0eca3a2f66ef2a2b1..b63d0ae2af0b67da2ec3f957fd55f61b8307a795 100644 (file)
@@ -12,7 +12,8 @@ class Group < ArvadosModel
   include CanBeAnOwner
   include Trashable
 
-  serialize :properties, Hash
+  # Posgresql JSONB columns should NOT be declared as serialized, Rails 5
+  # already know how to properly treat them.
 
   after_create :invalidate_permissions_cache
   after_update :maybe_invalidate_permissions_cache
@@ -40,7 +41,7 @@ class Group < ArvadosModel
   def invalidate_permissions_cache
     # Ensure a new group can be accessed by the appropriate users
     # immediately after being created.
-    User.invalidate_permissions_cache db_current_time.to_i
+    User.invalidate_permissions_cache self.async_permissions_update
   end
 
   def assign_name