Fix incorrect argument position in DbQuotaDriver

The prototype of db.quota_get is:
`quota_get(context, project_id, resource, user_id=None)`
However, in DbQuotaDriver::get_by_project_and_user(), the `user_id`
is incorrectly used as a positional argument.

Closes-Bug: #1255035

Change-Id: I5b6a4c59efe6d9bdc8380e50b7f7c1ff0d2029b1
This commit is contained in:
Tianpeng Wang 2013-11-26 13:10:40 +00:00
parent ba008c1482
commit cedcedd528
1 changed files with 1 additions and 1 deletions

View File

@ -97,7 +97,7 @@ class DbQuotaDriver(object):
def get_by_project_and_user(self, context, project_id, user_id, resource):
"""Get a specific quota by project and user."""
return db.quota_get(context, project_id, user_id, resource)
return db.quota_get(context, project_id, resource, user_id=user_id)
def get_by_project(self, context, project_id, resource):
"""Get a specific quota by project."""