[translation] include branch into primary key
Translation statistics records can be identified using user_id, project name (module), translated date (date), and branch name (branch). There can be several records for the same project and date, but different branches. Those records cannot be distinguished without branch on the translation primary key. Change-Id: I93059b62247ea3a7924f15dd610106d2bb5aaacb
This commit is contained in:
@@ -616,8 +616,8 @@ class RecordProcessor(object):
|
||||
user_id = user_processor.make_user_id(zanata_id=record['zanata_id'])
|
||||
|
||||
translation['record_type'] = 'tr'
|
||||
translation['primary_key'] = '%s:%s:%s' % (
|
||||
user_id, record['module'], record['date'])
|
||||
translation['primary_key'] = '%s:%s:%s:%s' % (
|
||||
user_id, record['module'], record['date'], record['branch'])
|
||||
translation['author_name'] = user_id
|
||||
|
||||
# following fields are put into standard fields stored in dashboard mem
|
||||
|
||||
Reference in New Issue
Block a user