Skip to content

Commit 4ea0e43

Browse files
docs: remove async-gridfs guide reference, enhance GenericReferenceField docstring
1 parent ddb4d99 commit 4ea0e43

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

docs/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ formats for offline reading.
7373

7474
tutorial
7575
guide/index
76-
guide/async-gridfs
7776
apireference
7877
changelog
7978
faq

mongoengine/fields.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
except ImportError:
3131
# Python ≤ 3.10
3232
from datetime import timezone
33+
3334
UTC = timezone.utc
3435

3536
from mongoengine.base import (
@@ -1253,6 +1254,11 @@ class GenericReferenceField(BaseField):
12531254
"""A reference to *any* Document subclass, stored as {"_cls": ..., "_ref": DBRef(...)}."""
12541255

12551256
def __init__(self, choices, *args, **kwargs):
1257+
"""
1258+
:param choices: The valid choices
1259+
:param *args: (optional) Arguments passed to the BaseField constructor.
1260+
:param **kwargs: (optional) Keyword Arguments passed to the BaseField constructor.
1261+
"""
12561262
if choices is None:
12571263
raise ValueError("GenericReferenceField requires a choices argument")
12581264
super().__init__(*args, **kwargs)

0 commit comments

Comments
 (0)