-
Notifications
You must be signed in to change notification settings - Fork 136
fix: Resolve multiple exporter failures after database migration #1321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: enext
Are you sure you want to change the base?
Changes from all commits
1666d06
bcfe7af
1a65640
2fdb75a
983577e
7ac53ce
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -232,6 +232,9 @@ def render_page(positions): | |||||||||||||
| if pagebuffer: | ||||||||||||||
| render_page(pagebuffer) | ||||||||||||||
|
|
||||||||||||||
| if not any: | ||||||||||||||
| raise OrderError(_('None of the selected products is configured to print badges.')) | ||||||||||||||
|
|
||||||||||||||
|
Comment on lines
+235
to
+237
|
||||||||||||||
| if not any: | |
| raise OrderError(_('None of the selected products is configured to print badges.')) | |
| # Check for empty badge set before writing metadata or PDF | |
| if not any: | |
| raise OrderError(_('None of the selected products is configured to print badges.')) |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -375,28 +375,33 @@ def _table_story(self, doc, form_data, net=False): | |||||||||
| if tup[0]: | ||||||||||
| tdata.append([Paragraph(str(tup[0].name), tstyle_bold)]) | ||||||||||
| for l, s in states: | ||||||||||
| tdata[-1].append(str(tup[0].num[l][0])) | ||||||||||
| tdata[-1].append(floatformat(tup[0].num[l][2 if net else 1], places)) | ||||||||||
| num_data = tup[0].num.get(l, (0, 0, 0)) if hasattr(tup[0], 'num') and tup[0].num else (0, 0, 0) | ||||||||||
| tdata[-1].append(str(num_data[0] if len(num_data) > 0 else 0)) | ||||||||||
| tdata[-1].append(floatformat(num_data[2 if net else 1] if len(num_data) > (2 if net else 1) else 0, places)) | ||||||||||
|
Comment on lines
+378
to
+380
|
||||||||||
| for item in tup[1]: | ||||||||||
| tdata.append([str(item)]) | ||||||||||
| for l, s in states: | ||||||||||
| tdata[-1].append(str(item.num[l][0])) | ||||||||||
| tdata[-1].append(floatformat(item.num[l][2 if net else 1], places)) | ||||||||||
| num_data = item.num.get(l, (0, 0, 0)) if hasattr(item, 'num') and item.num else (0, 0, 0) | ||||||||||
| tdata[-1].append(str(num_data[0] if len(num_data) > 0 else 0)) | ||||||||||
| tdata[-1].append(floatformat(num_data[2 if net else 1] if len(num_data) > (2 if net else 1) else 0, places)) | ||||||||||
|
Comment on lines
+384
to
+386
|
||||||||||
| if item.has_variations: | ||||||||||
| for var in item.all_variations: | ||||||||||
| tdata.append([Paragraph(' ' + str(var), tstyle)]) | ||||||||||
| for l, s in states: | ||||||||||
| tdata[-1].append(str(var.num[l][0])) | ||||||||||
| tdata[-1].append(floatformat(var.num[l][2 if net else 1], places)) | ||||||||||
| num_data = var.num.get(l, (0, 0, 0)) if hasattr(var, 'num') and var.num else (0, 0, 0) | ||||||||||
| tdata[-1].append(str(num_data[0] if len(num_data) > 0 else 0)) | ||||||||||
| tdata[-1].append(floatformat(num_data[2 if net else 1] if len(num_data) > (2 if net else 1) else 0, places)) | ||||||||||
|
Comment on lines
+391
to
+393
|
||||||||||
|
|
||||||||||
| tdata.append( | ||||||||||
| [ | ||||||||||
| _('Total'), | ||||||||||
| ] | ||||||||||
| ) | ||||||||||
| for l, s in states: | ||||||||||
| tdata[-1].append(str(total['num'][l][0])) | ||||||||||
| tdata[-1].append(floatformat(total['num'][l][2 if net else 1], places)) | ||||||||||
| # Safeguard for empty data | ||||||||||
| num_data = total.get('num', {}).get(l, (0, 0, 0)) | ||||||||||
| tdata[-1].append(str(num_data[0] if len(num_data) > 0 else 0)) | ||||||||||
| tdata[-1].append(floatformat(num_data[2 if net else 1] if len(num_data) > (2 if net else 1) else 0, places)) | ||||||||||
|
Comment on lines
+403
to
+404
|
||||||||||
| tdata[-1].append(str(num_data[0] if len(num_data) > 0 else 0)) | |
| tdata[-1].append(floatformat(num_data[2 if net else 1] if len(num_data) > (2 if net else 1) else 0, places)) | |
| tdata[-1].append(str(num_data[0])) | |
| tdata[-1].append(floatformat(num_data[2 if net else 1], places)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent indentation in list construction. Lines 121-130 should be indented to align with the opening bracket on line 120. All list items should have consistent indentation (either all at the same level as line 120, or all indented one level deeper).