mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-16 20:15:44 +00:00
fix for python 3.9
This commit is contained in:
@ -62,9 +62,13 @@ if sys.version_info >= (3, 11):
|
|||||||
from typing import NotRequired
|
from typing import NotRequired
|
||||||
else:
|
else:
|
||||||
|
|
||||||
class NotRequired:
|
class NotRequired: # pragma: no cover
|
||||||
"""NotRequired type helper is only supported with Python 3.11+."""
|
"""NotRequired type helper is only supported with Python 3.11+."""
|
||||||
|
|
||||||
|
def __class_getitem__(cls, item):
|
||||||
|
"""Return the item."""
|
||||||
|
return item
|
||||||
|
|
||||||
|
|
||||||
class MetaMixin(models.Model):
|
class MetaMixin(models.Model):
|
||||||
"""A base class for InvenTree models to include shared meta fields.
|
"""A base class for InvenTree models to include shared meta fields.
|
||||||
|
Reference in New Issue
Block a user