fix supplier_id mass assignment bug for list
This commit is contained in:
+2
-1
@@ -59,7 +59,8 @@ class List
|
|||||||
# Create, a list given a table and a user
|
# Create, a list given a table and a user
|
||||||
def self.from_table table, user
|
def self.from_table table, user
|
||||||
return if user.has_active_list?
|
return if user.has_active_list?
|
||||||
list = new table: table, supplier_id: table.supplier_id, section_id: table.section_id
|
list = new table: table, section_id: table.section_id
|
||||||
|
list.supplier_id = table.supplier_id
|
||||||
list.add_user user
|
list.add_user user
|
||||||
list.save
|
list.save
|
||||||
user.active_list_id = list.id
|
user.active_list_id = list.id
|
||||||
|
|||||||
Reference in New Issue
Block a user