Allow blank order donated field on lnpayment admin edits

This commit is contained in:
Reckless_Satoshi 2023-05-18 07:27:24 -07:00
parent 0797a7d1ef
commit 5303186896
No known key found for this signature in database
GPG Key ID: 9C4585B561315571
3 changed files with 27 additions and 0 deletions

View File

@ -318,6 +318,7 @@ class LNPaymentAdmin(AdminChangeLinksMixin, admin.ModelAdmin):
raw_id_fields = (
"receiver",
"sender",
"order_donated",
)
list_filter = ("type", "concept", "status")
ordering = ("-expires_at",)

View File

@ -0,0 +1,25 @@
# Generated by Django 4.2.1 on 2023-05-18 14:25
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
("api", "0037_lnpayment_order_donated_alter_lnpayment_concept_and_more"),
]
operations = [
migrations.AlterField(
model_name="lnpayment",
name="order_donated",
field=models.ForeignKey(
blank=True,
default=None,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name="order_donated",
to="api.order",
),
),
]

View File

@ -124,6 +124,7 @@ class LNPayment(models.Model):
null=True,
on_delete=models.SET_NULL,
default=None,
blank=True,
)
def __str__(self):