kopia lustrzana https://gitlab.com/marnanel/chapeau
Undoing the AcObject changes introduced in e9d780d2
.
The changes would require multiple inheritance, which PolymorphicModel doesn't support.status-serialisers
rodzic
39154b1450
commit
ccdc414ad8
|
@ -0,0 +1,25 @@
|
|||
# Generated by Django 3.0.9 on 2020-08-20 15:35
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('trilby_api', '0020_auto_20200815_1749'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='localperson',
|
||||
options={'base_manager_name': 'objects'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='person',
|
||||
options={'base_manager_name': 'objects'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='remoteperson',
|
||||
options={'base_manager_name': 'objects'},
|
||||
),
|
||||
]
|
|
@ -1,20 +0,0 @@
|
|||
# acobject.py
|
||||
#
|
||||
# Part of kepi.
|
||||
# Copyright (c) 2018-2020 Marnanel Thurman.
|
||||
# Licensed under the GNU Public License v2.
|
||||
|
||||
import logging
|
||||
logger = logging.Logger("kepi")
|
||||
|
||||
from polymorphic.models import PolymorphicModel
|
||||
|
||||
class AcObject(PolymorphicModel):
|
||||
|
||||
"""
|
||||
AcObjects are the ancestors of classes we can
|
||||
receive over ActivityPub.
|
||||
"""
|
||||
|
||||
class Meta:
|
||||
abstract = True
|
|
@ -19,9 +19,8 @@ import kepi.bowler_pub.utils as bowler_utils
|
|||
from django.utils.timezone import now
|
||||
from django.core.exceptions import ValidationError
|
||||
from urllib.parse import urlparse
|
||||
from .acobject import AcObject
|
||||
|
||||
class Person(AcObject):
|
||||
class Person(PolymorphicModel):
|
||||
|
||||
@property
|
||||
def icon_or_default(self):
|
||||
|
|
|
@ -8,11 +8,11 @@ import kepi.trilby_api.utils as trilby_utils
|
|||
from django.utils.timezone import now
|
||||
from django.core.exceptions import ValidationError
|
||||
import logging
|
||||
from .acobject import AcObject
|
||||
from polymorphic.models import PolymorphicModel
|
||||
|
||||
logger = logging.Logger('kepi')
|
||||
|
||||
class Status(AcObject):
|
||||
class Status(PolymorphicModel):
|
||||
|
||||
class Meta:
|
||||
verbose_name_plural = 'Statuses'
|
||||
|
|
Ładowanie…
Reference in New Issue