@classmethod
    def perform_model_checks(cls):
        try:
            order_field = [f for f in OrderItemModel._meta.fields if f.attname == 'quantity'][0]
            deliver_field = [f for f in cls._meta.fields if f.attname == 'quantity'][0]
            if order_field.get_internal_type() != deliver_field.get_internal_type():
                msg = "Field `{}.quantity` must be of one same type `{}.quantity`."
                raise ImproperlyConfigured(msg.format(cls.__name__, OrderItemModel.__name__))
        except __HOLE__:
            msg = "Class `{}` must implement a field named `quantity`."
            raise ImproperlyConfigured(msg.format(cls.__name__))
dataset/ETHPy150Open awesto/django-shop/shop/models/delivery.py/BaseDeliveryItem.perform_model_checks