BeanieODM / bunnet

Synchronous Python ODM for MongoDB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Documentation of CurrentDate and others update operators

prise6 opened this issue · comments

Describe the bug
For example CurrentDate documentation (here)

class Sample(Document):
    ts: datetime

CurrentDate({Sample.ts, True})

Will return query object like

{"$currentDate": {"ts": True}}

It should be CurrentDate({Sample.ts: True}).

To Reproduce

from bunnet.operators import Set, CurrentDate
print(CurrentDate({Sample.ts, True}))
# {'$currentDate': {True, 'ts'}}

print(CurrentDate({Sample.ts: True}))
# {'$currentDate': {'ts': True}}

Just typo in docstring documentation in file bunnet/odm/operators/update/general.py

This issue is stale because it has been open 30 days with no activity.

This issue was closed because it has been stalled for 14 days with no activity.