mirror of
https://github.com/RoboSats/robosats.git
synced 2024-12-14 11:26:24 +00:00
Allow blank order donated field on lnpayment admin edits
This commit is contained in:
parent
0797a7d1ef
commit
5303186896
@ -318,6 +318,7 @@ class LNPaymentAdmin(AdminChangeLinksMixin, admin.ModelAdmin):
|
|||||||
raw_id_fields = (
|
raw_id_fields = (
|
||||||
"receiver",
|
"receiver",
|
||||||
"sender",
|
"sender",
|
||||||
|
"order_donated",
|
||||||
)
|
)
|
||||||
list_filter = ("type", "concept", "status")
|
list_filter = ("type", "concept", "status")
|
||||||
ordering = ("-expires_at",)
|
ordering = ("-expires_at",)
|
||||||
|
25
api/migrations/0038_alter_lnpayment_order_donated.py
Normal file
25
api/migrations/0038_alter_lnpayment_order_donated.py
Normal 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",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]
|
@ -124,6 +124,7 @@ class LNPayment(models.Model):
|
|||||||
null=True,
|
null=True,
|
||||||
on_delete=models.SET_NULL,
|
on_delete=models.SET_NULL,
|
||||||
default=None,
|
default=None,
|
||||||
|
blank=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user