diff --git a/app/graph/mutations/graphql_crud_operations.rb b/app/graph/mutations/graphql_crud_operations.rb index 8b7a493136..15fe74f699 100644 --- a/app/graph/mutations/graphql_crud_operations.rb +++ b/app/graph/mutations/graphql_crud_operations.rb @@ -1,5 +1,6 @@ class GraphqlCrudOperations def self.safe_save(obj, attrs, parent_names = []) + raise "Can't save a null object." if obj.nil? raise 'This operation must be done by a signed-in user' if User.current.nil? && ApiKey.current.nil? attrs.each do |key, value| method = key == "clientMutationId" ? "client_mutation_id=" : "#{key}="