-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issue #20 #23
Fix issue #20 #23
Conversation
aggify/aggify.py
Outdated
|
||
from aggify.compiler import F, Match, Q, Operators # noqa keep | ||
from aggify.exceptions import ( | ||
AggifyValueError, | ||
AnnotationError, | ||
InvalidField, | ||
InvalidEmbeddedField, | ||
OutStageError, | ||
OutStageError, InvalidArgument, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
format code
aggify/aggify.py
Outdated
) | ||
from aggify.types import QueryParams | ||
from aggify.utilty import ( | ||
to_mongo_positive_index, | ||
check_fields_exist, | ||
replace_values_recursive, | ||
convert_match_query, | ||
convert_match_query, check_field_exists, get_db_field, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
format code
aggify/aggify.py
Outdated
or issubclass(join_field.document_type, EmbeddedDocument) | ||
or len(split_query) == 1 | ||
or (len(split_query) == 2 and split_query[1] in Operators.ALL_OPERATORS) | ||
isinstance(join_field, TopLevelDocumentMetaclass) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add comment and description about what do this code
aggify/aggify.py
Outdated
from_collection_name = from_collection._meta.get("collection") # noqa | ||
|
||
if not let and not (local_field and foreign_field): | ||
raise InvalidArgument(expected_list=[['local_field', 'foreign_field'], 'let']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace ' with "
return self.base_model is not None and isinstance( | ||
self.base_model._fields.get(field), # type: ignore # noqa | ||
EmbeddedDocumentField, | ||
return self.base_model is not None and ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add doc string
No description provided.