changed the wrong model :(
This commit is contained in:
parent
e4e5688e3c
commit
8a318400ae
27
src/shop/migrations/0041_auto_20170408_1104.py
Normal file
27
src/shop/migrations/0041_auto_20170408_1104.py
Normal file
|
@ -0,0 +1,27 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10.5 on 2017-04-08 09:04
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import django.contrib.postgres.fields.jsonb
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('shop', '0040_auto_20170408_1055'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='coinifyapicallback',
|
||||
name='payload',
|
||||
field=django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=''),
|
||||
preserve_default=False,
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='epaycallback',
|
||||
name='payload',
|
||||
field=django.contrib.postgres.fields.jsonb.JSONField(),
|
||||
),
|
||||
]
|
|
@ -309,7 +309,7 @@ class EpayCallback(CreatedUpdatedModel, UUIDModel):
|
|||
verbose_name_plural = 'Epay Callbacks'
|
||||
ordering = ['-created']
|
||||
|
||||
payload = JSONField(blank=True)
|
||||
payload = JSONField()
|
||||
md5valid = models.BooleanField(default=False)
|
||||
|
||||
def __str__(self):
|
||||
|
@ -410,7 +410,7 @@ class CoinifyAPIInvoice(CreatedUpdatedModel):
|
|||
|
||||
class CoinifyAPICallback(CreatedUpdatedModel):
|
||||
headers = JSONField()
|
||||
payload = JSONField(null=True)
|
||||
payload = JSONField(blank=True)
|
||||
body = models.TextField(default='')
|
||||
order = models.ForeignKey('shop.Order')
|
||||
valid = models.BooleanField(default=False)
|
||||
|
|
|
@ -605,7 +605,7 @@ class CoinifyCallbackView(SingleObjectMixin, View):
|
|||
try:
|
||||
parsed = json.loads(str(request.body))
|
||||
except Exception as E:
|
||||
parsed = None
|
||||
parsed = ''
|
||||
|
||||
# save callback to db
|
||||
callbackobject = CoinifyAPICallback.objects.create(
|
||||
|
|
Loading…
Reference in a new issue