Add webhook ID to asset restriction model

This commit is contained in:
Mark Veidemanis 2023-02-10 21:13:12 +00:00
parent 101a4933c9
commit 1d01368570
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
2 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,24 @@
# Generated by Django 4.1.6 on 2023-02-10 21:07
from django.db import migrations, models
import uuid
class Migration(migrations.Migration):
dependencies = [
('core', '0053_assetrestriction_pairs_parsed_and_more'),
]
operations = [
migrations.AddField(
model_name='assetrestriction',
name='webhook_id',
field=models.UUIDField(default=uuid.uuid4, editable=False, unique=True),
),
migrations.AlterField(
model_name='assetgroup',
name='allowed',
field=models.JSONField(blank=True, default=dict, null=True),
),
]

View File

@ -1,3 +1,4 @@
import uuid
from datetime import timedelta from datetime import timedelta
import stripe import stripe
@ -439,6 +440,8 @@ class AssetRestriction(models.Model):
pairs = models.CharField(max_length=4096, null=True, blank=True) pairs = models.CharField(max_length=4096, null=True, blank=True)
pairs_parsed = models.JSONField(null=True, blank=True) pairs_parsed = models.JSONField(null=True, blank=True)
webhook_id = models.UUIDField(default=uuid.uuid4, editable=False, unique=True)
group = models.ForeignKey( group = models.ForeignKey(
AssetGroup, on_delete=models.CASCADE, null=True, blank=True AssetGroup, on_delete=models.CASCADE, null=True, blank=True
) )