Specify user_id on load_user() calls

Two load_user() calls didn't specify the argument user_id in
record_processor module, that meaned the parameters were passed
as seq, instead of user_id.
In load_user(), seq and user_id are handled as the same way and
we didn't face any problem due to this bug. This patch makes
the method specify the argument clearly to avoid issues when
changing internal behavior of load_user().

Change-Id: I1bfd08c273bd0272eada7cb3b27930a0f7a43315
This commit is contained in:
Ken'ichi Ohmichi
2017-06-15 12:46:04 -07:00
parent 9d3daee1b9
commit 48e114d940

View File

@@ -587,7 +587,8 @@ class RecordProcessor(object):
# _update_record_and_user function will create new user if needed
self._update_record_and_user(record)
record['company_name'] = company_name
user = user_processor.load_user(self.runtime_storage_inst, user_id)
user = user_processor.load_user(self.runtime_storage_inst,
user_id=user_id)
user['user_name'] = record['author_name']
user['companies'] = [{
@@ -894,7 +895,7 @@ class RecordProcessor(object):
yield record
user = user_processor.load_user(self.runtime_storage_inst,
record['user_id'])
user_id=record['user_id'])
LOG.debug('Update user %s, company name changed to %s',
user, company_name)
user['companies'] = [{