diff --git a/cqlengine/query.py b/cqlengine/query.py index b24c67a0..6619c5a2 100644 --- a/cqlengine/query.py +++ b/cqlengine/query.py @@ -756,7 +756,7 @@ class ModelQuerySet(AbstractQuerySet): def update(self, **values): """ Updates the rows in this queryset """ if not values: - raise ValidationError("At least one column needs to be updated") + return set_statements = [] ctx = {} diff --git a/cqlengine/tests/query/test_updates.py b/cqlengine/tests/query/test_updates.py index 56d5cd5e..0c9c88cf 100644 --- a/cqlengine/tests/query/test_updates.py +++ b/cqlengine/tests/query/test_updates.py @@ -1,5 +1,6 @@ from uuid import uuid4 from cqlengine.exceptions import ValidationError +from cqlengine.query import QueryException from cqlengine.tests.base import BaseCassEngTestCase from cqlengine.models import Model @@ -62,11 +63,6 @@ class QueryUpdateTests(BaseCassEngTestCase): with self.assertRaises(ValidationError): TestQueryUpdateModel.objects(partition=partition, cluster=3).update(count='asdf') - def test_update_with_no_values_failure(self): - """ tests calling update on models with no values passed in """ - with self.assertRaises(ValidationError): - TestQueryUpdateModel.objects(partition=uuid4(), cluster=3).update() - def test_invalid_update_kwarg(self): """ tests that passing in a kwarg to the update method that isn't a column will fail """ with self.assertRaises(ValidationError):