Skip to content
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

Hotfix: Don't assume subscription has a note when showing admin/invoices/failed/ #1425

Open
chrisjsimpson opened this issue Dec 28, 2024 · 0 comments

Comments

@chrisjsimpson
Copy link
Contributor

Is your feature request related to a problem? Please describe.

UndefinedError
jinja2.exceptions.UndefinedError: 'None' has no attribute 'strip'

https://github.com/Subscribie/subscribie/blob/51fd8052aa08d7fd3dff157fcb9cfafe0f61ed6d/subscribie/blueprints/admin/templates/admin/invoice/failed_invoices.html

                            {% for invoice in debtor['failedInvoices'] %}
                            <tr>
                              <td>{{ invoice.subscribie_subscription.plan.title }}
                              </td>
                              <td>{% if invoice.subscribie_subscription.note %}
                                    {% if invoice.subscribie_subscription.note.note.strip() != '' %}
                                      {{ invoice.subscribie_subscription.note.note }}
                                    {% else %}
                                        <small style="color: lightgrey">None</small>
                                    {% endif %}
                                  {% endif %}

Describe the solution you'd like

Describe alternatives you've considered
actually use a type strict templating language.

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant