use self variables to fix undefined behaviour

This commit is contained in:
Ivan Ladelshchikov 2016-07-27 14:38:05 +03:00 committed by Itai Shirav
parent a727c3cf01
commit e7d0668418

View File

@ -118,9 +118,9 @@ class Database(object):
def _build_params(self, settings): def _build_params(self, settings):
params = dict(settings or {}) params = dict(settings or {})
if self.username: if self.username:
params['username'] = username params['username'] = self.username
if self.password: if self.password:
params['password'] = password params['password'] = self.password
return params return params
def _substitute(self, query, model_class=None): def _substitute(self, query, model_class=None):