From a5cb99c0c369e11efbbaeb54e095667b65f94d08 Mon Sep 17 00:00:00 2001 From: Qwann Date: Tue, 7 Aug 2018 20:43:56 +0200 Subject: [PATCH] rm old owner --- equipment/admin.py | 4 ++-- ...3_auto_20180807_1828.py => 0003_auto_20180807_1843.py} | 8 +++----- equipment/models.py | 5 ----- 3 files changed, 5 insertions(+), 12 deletions(-) rename equipment/migrations/{0003_auto_20180807_1828.py => 0003_auto_20180807_1843.py} (56%) diff --git a/equipment/admin.py b/equipment/admin.py index bcadaa1..f4b0091 100644 --- a/equipment/admin.py +++ b/equipment/admin.py @@ -61,8 +61,8 @@ class CharFieldModelAdmin(admin.ModelAdmin): class EquipmentAdmin(admin.ModelAdmin): - list_display = ['name', 'stock', 'owner', 'pole', 'category'] - ordering = ['name', 'owner', 'pole', 'category'] + list_display = ['name', 'stock', 'pole', 'category'] + ordering = ['name', 'pole', 'category'] inlines = [EquipmentDefaultExtraInline, EquipmentLostExtraInline, EquipmentRevisionExtraInline] diff --git a/equipment/migrations/0003_auto_20180807_1828.py b/equipment/migrations/0003_auto_20180807_1843.py similarity index 56% rename from equipment/migrations/0003_auto_20180807_1828.py rename to equipment/migrations/0003_auto_20180807_1843.py index 3ce898d..16d6bfb 100644 --- a/equipment/migrations/0003_auto_20180807_1828.py +++ b/equipment/migrations/0003_auto_20180807_1843.py @@ -1,9 +1,8 @@ # -*- coding: utf-8 -*- -# Generated by Django 1.11.11 on 2018-08-07 18:28 +# Generated by Django 1.11.11 on 2018-08-07 18:43 from __future__ import unicode_literals -from django.db import migrations, models -import django.db.models.deletion +from django.db import migrations class Migration(migrations.Migration): @@ -13,10 +12,9 @@ class Migration(migrations.Migration): ] operations = [ - migrations.AlterField( + migrations.RemoveField( model_name='equipment', name='owner', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='auth.Group'), ), migrations.DeleteModel( name='EquipmentOwner', diff --git a/equipment/models.py b/equipment/models.py index 9b47dff..7120c4e 100644 --- a/equipment/models.py +++ b/equipment/models.py @@ -50,11 +50,6 @@ class Equipment(EventSpecificMixin, models.Model): related_name="equipment", through="EquipmentAttribution", ) - owner = models.ForeignKey( - Group, - blank=True, - null=True, - ) pole = models.ForeignKey( EquipmentPole, )