diff --git a/cinder/db/api.py b/cinder/db/api.py index e6f0e572ab1..e4130bd098e 100644 --- a/cinder/db/api.py +++ b/cinder/db/api.py @@ -1935,7 +1935,7 @@ def conditional_update(context, model, values, expected_values, filters=(), equivalent to read_deleted. :param project_only: Should the query be limited to context's project. :param order: Specific order of fields in which to update the values - :returns: Number of db rows that were updated. + :returns: Boolean indicating whether db rows were updated. """ return IMPL.conditional_update(context, model, values, expected_values, filters, include_deleted, project_only, diff --git a/cinder/objects/base.py b/cinder/objects/base.py index 116906eabb8..613912ec1ed 100644 --- a/cinder/objects/base.py +++ b/cinder/objects/base.py @@ -412,9 +412,9 @@ class CinderPersistentObject(object): mean in some cases that we have to reload the object from the database. :param order: Specific order of fields in which to update the values - :returns: number of db rows that were updated, which can be used as a - boolean, since it will be 0 if we couldn't update the DB and - 1 if we could, because we are using unique index id. + :returns: Boolean indicating whether db rows were updated. + It will be False if we couldn't update the DB and + True if we could. """ if 'id' not in self.fields: msg = (_('VersionedObject %s does not support conditional update.')