Commit 00f1fcf9 authored by Amap's avatar Amap

Modification des relations pour requests

parent 4159d9e0
......@@ -42,7 +42,7 @@ INSTALLED_APPS = (
'users',
'panier',
'amap',
# 'search',
'search',
'reversion'
)
......
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('users', '0006_user_sac_consignes'),
]
operations = [
migrations.AlterField(
model_name='request',
name='user',
field=models.ForeignKey(to=settings.AUTH_USER_MODEL),
),
]
......@@ -190,7 +190,7 @@ class Request(models.Model):
)
type = models.CharField(max_length=2, choices=TYPE_CHOICES)
token = models.CharField(max_length=32)
user = models.ForeignKey('User', on_delete=models.PROTECT)
user = models.ForeignKey('User', on_delete=models.CASCADE)
created_at = models.DateTimeField(auto_now_add=True, editable=False)
expires_at = models.DateTimeField()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment