fixing incompatibility with mongoengine aggregation to support mongo 4.4
This commit is contained in:
@@ -34,6 +34,14 @@ def get_as_pymongo(doc):
|
||||
return doc.__class__.objects.as_pymongo().get(id=doc.id)
|
||||
|
||||
|
||||
def requires_mongodb_lt_42(func):
|
||||
return _decorated_with_ver_requirement(func, (4, 2), oper=operator.lt)
|
||||
|
||||
|
||||
def requires_mongodb_lte_42(func):
|
||||
return _decorated_with_ver_requirement(func, (4, 2), oper=operator.le)
|
||||
|
||||
|
||||
def requires_mongodb_gte_44(func):
|
||||
return _decorated_with_ver_requirement(func, (4, 4), oper=operator.ge)
|
||||
|
||||
|
Reference in New Issue
Block a user