From 1404d2006d4566508c9eaa242de0940c4af61836 Mon Sep 17 00:00:00 2001 From: f Date: Thu, 22 Feb 2024 13:32:30 -0300 Subject: [PATCH] fixup! feat: asociar rol con deploy nos permite acceder al token --- db/migrate/20240216170202_add_rol_to_deploys.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migrate/20240216170202_add_rol_to_deploys.rb b/db/migrate/20240216170202_add_rol_to_deploys.rb index 5f629432..93c4553d 100644 --- a/db/migrate/20240216170202_add_rol_to_deploys.rb +++ b/db/migrate/20240216170202_add_rol_to_deploys.rb @@ -6,7 +6,7 @@ class AddRolToDeploys < ActiveRecord::Migration[6.1] add_column :deploys, :rol_id, :integer, index: true Deploy.find_each do |deploy| - rol_id = deploy.site.roles.find_by(rol: 'usuarie', temporal: false).id + rol_id = deploy.site.roles.find_by(rol: 'usuarie', temporal: false)&.id deploy.update_column(:rol_id, rol_id) if rol_id end