2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-15 11:35:41 +00:00

fix for python 3.9

This commit is contained in:
wolflu05
2024-07-15 10:56:57 +02:00
parent ba925ee07e
commit 832130f6cd

View File

@ -62,9 +62,13 @@ if sys.version_info >= (3, 11):
from typing import NotRequired
else:
class NotRequired:
class NotRequired: # pragma: no cover
"""NotRequired type helper is only supported with Python 3.11+."""
def __class_getitem__(cls, item):
"""Return the item."""
return item
class MetaMixin(models.Model):
"""A base class for InvenTree models to include shared meta fields.