Merge lp:~dorian-kemps/unifield-server/US-11218 into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 6469
Proposed branch: lp:~dorian-kemps/unifield-server/US-11218
Merge into: lp:unifield-server
Diff against target: 41 lines (+7/-5)
1 file modified
bin/addons/msf_tools/automated_import_job.py (+7/-5)
To merge this branch: bzr merge lp:~dorian-kemps/unifield-server/US-11218
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+442410@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/addons/msf_tools/automated_import_job.py'
2--- bin/addons/msf_tools/automated_import_job.py 2022-12-12 14:43:29 +0000
3+++ bin/addons/msf_tools/automated_import_job.py 2023-05-05 07:22:01 +0000
4@@ -250,6 +250,7 @@
5 started_job_id = False
6 md5 = False
7 error = None
8+ non_blocking_error = None
9 data64 = None
10 filename = False
11 oldest_file = False
12@@ -306,23 +307,24 @@
13 break
14
15 elif md5 and self.search_exist(cr, uid, [('import_id', '=', import_data.id), ('file_sum', '=', md5)], context=context):
16- error = _('A file with same checksum has been already imported !')
17+ non_blocking_error = _('A file with same checksum has been already imported !')
18 remote.move_to_process_path(filename, success=False)
19 self.infolog(cr, uid, _('%s :: Import file (%s) moved to destination path') % (import_data.name, filename))
20
21- if error:
22- self.infolog(cr, uid, '%s :: %s' % (import_data.name , error))
23+ if error or non_blocking_error:
24+ self.infolog(cr, uid, '%s :: %s' % (import_data.name, error or non_blocking_error))
25 self.write(cr, uid, [job.id], {
26 'filename': filename,
27 'file_to_import': data64,
28 'end_time': time.strftime('%Y-%m-%d %H:%M:%S'),
29 'nb_processed_records': 0,
30 'nb_rejected_records': 0,
31- 'comment': error,
32+ 'comment': error or non_blocking_error,
33 'file_sum': md5,
34 'state': 'done' if no_file else 'error',
35 }, context=context)
36- no_file = True
37+ if error:
38+ no_file = True
39 continue
40 else: # file to import given
41 no_file = True

Subscribers

People subscribed via source and target branches