diff --git a/app/controllers/categories_controller.rb b/app/controllers/categories_controller.rb index 20c6d6b23f2..d143ff8e6d9 100644 --- a/app/controllers/categories_controller.rb +++ b/app/controllers/categories_controller.rb @@ -196,8 +196,8 @@ class CategoriesController < ApplicationController category_params.delete(:custom_fields) # properly null the value so the database constraint doesn't catch us - category_params[:email_in] = nil if category_params[:email_in]&.blank? - category_params[:minimum_required_tags] = 0 if category_params[:minimum_required_tags]&.blank? + category_params[:email_in] = nil if category_params[:email_in].blank? + category_params[:minimum_required_tags] = 0 if category_params[:minimum_required_tags].blank? old_permissions = cat.permissions_params old_permissions = { "everyone" => 1 } if old_permissions.empty? diff --git a/app/models/concerns/positionable.rb b/app/models/concerns/positionable.rb index 6ee93cdf4c9..66b854f97be 100644 --- a/app/models/concerns/positionable.rb +++ b/app/models/concerns/positionable.rb @@ -33,5 +33,7 @@ module Positionable WHERE id = :id", id: id, position: position + + self.position = position end end