Commit 94e90fa8 authored by arun.uday's avatar arun.uday

AssetManager-V1.0-Not reveiwed

response update
parent 3186c255
2023-04-05 19:15:09 - INFO - [MainThread:<module>(): 37] - App Starting at 0.0.0.0:8671 2023-04-05 19:15:09 - INFO - [MainThread:<module>(): 37] - App Starting at 0.0.0.0:8671
2023-04-05 19:15:29 - INFO - [MainThread:<module>(): 37] - App Starting at 0.0.0.0:8671 2023-04-05 19:15:29 - INFO - [MainThread:<module>(): 37] - App Starting at 0.0.0.0:8671
2023-04-06 10:07:03 - INFO - [MainThread:<module>(): 37] - App Starting at 0.0.0.0:8671
2023-04-06 11:15:22 - ERROR - [MainThread:db_password_matching(): 76] - Services Failed with error from process login db password matching hash could not be identified
2023-04-06 11:16:06 - INFO - [MainThread:<module>(): 37] - App Starting at 0.0.0.0:8671
2023-04-06 11:16:09 - ERROR - [MainThread:db_password_matching(): 76] - Services Failed with error from process login db password matching hash could not be identified
2023-04-06 11:16:56 - INFO - [MainThread:<module>(): 37] - App Starting at 0.0.0.0:8671
2023-04-06 11:17:02 - ERROR - [MainThread:db_password_matching(): 77] - Services Failed with error from process login db password matching hash could not be identified
2023-04-06 11:17:37 - INFO - [MainThread:<module>(): 37] - App Starting at 0.0.0.0:8671
2023-04-06 11:17:39 - ERROR - [MainThread:db_password_matching(): 77] - Services Failed with error from process login db password matching hash could not be identified
2023-04-06 11:18:13 - INFO - [MainThread:<module>(): 37] - App Starting at 0.0.0.0:8671
2023-04-06 11:18:16 - ERROR - [MainThread:db_password_matching(): 77] - Services Failed with error from process login db password matching hash could not be identified
2023-04-06 11:18:39 - INFO - [MainThread:<module>(): 37] - App Starting at 0.0.0.0:8671
2023-04-06 11:18:47 - ERROR - [MainThread:db_password_matching(): 77] - Services Failed with error from process login db password matching hash could not be identified
2023-04-06 12:15:33 - INFO - [MainThread:<module>(): 37] - App Starting at 0.0.0.0:8671
2023-04-06 14:43:59 - ERROR - [MainThread:reset_password(): 318] - Services Failed with error from reset user password 'password'
Traceback (most recent call last):
File "E:\Git\meta-services\scripts\core\handlers\user_management_handler.py", line 278, in reset_password
db_user_data["password"]):
KeyError: 'password'
2023-04-06 14:58:17 - INFO - [MainThread:<module>(): 37] - App Starting at 0.0.0.0:8671
2023-04-06 15:23:00 - INFO - [MainThread:<module>(): 37] - App Starting at 0.0.0.0:8671
2023-04-06 15:23:06 - ERROR - [MainThread:fetch_user_details(): 257] - Services Failed with error from fetch user details unhashable type: 'dict'
Traceback (most recent call last):
File "E:\Git\meta-services\scripts\core\handlers\user_management_handler.py", line 237, in fetch_user_details
cursor_data = obj_mongo_user.fetch_all_user_details({"user_id": {obj_stage.not_equal(request.user_id)}},
TypeError: unhashable type: 'dict'
2023-04-06 15:23:41 - INFO - [MainThread:<module>(): 37] - App Starting at 0.0.0.0:8671
2023-04-06 15:53:28 - INFO - [MainThread:<module>(): 37] - App Starting at 0.0.0.0:8671
...@@ -48,7 +48,7 @@ class NormalLogin: ...@@ -48,7 +48,7 @@ class NormalLogin:
try: try:
response = {"user_id": self.db_user_data["user_id"], "name": self.db_user_data["name"], response = {"user_id": self.db_user_data["user_id"], "name": self.db_user_data["name"],
"email": email, "email": email,
"user_role": self.db_user_data["user_role"]} "user_role": self.db_user_data["user_role"], "login_type": self.db_user_data["login_type"]}
except KeyError: except KeyError:
response = {"user_id": self.db_user_data["user_id"], response = {"user_id": self.db_user_data["user_id"],
"email": email, "email": email,
......
import datetime import datetime
import uuid import uuid
from fastapi import status
from fastapi.responses import JSONResponse
from passlib.context import CryptContext from passlib.context import CryptContext
from scripts.database.mongo.mongo_db import MongoUser from scripts.database.mongo.mongo_db import MongoUser
from scripts.database.redis.redis_conn import login_db from scripts.database.redis.redis_conn import login_db
from scripts.errors import ErrorMessages from scripts.errors import ErrorMessages
from scripts.logging.logger import logger from scripts.logging.logger import logger
from fastapi.responses import JSONResponse
from fastapi import status
from scripts.schemas.default_responses import DefaultResponse, DefaultFailureResponse, DefaultSuccessResponse from scripts.schemas.default_responses import DefaultResponse, DefaultFailureResponse, DefaultSuccessResponse
from scripts.utils.mongo_utils import MongoStageCreator from scripts.utils.mongo_utils import MongoStageCreator
from scripts.utils.response_utils import ResponseData from scripts.utils.response_utils import ResponseData
...@@ -233,7 +233,8 @@ class UserManagement: ...@@ -233,7 +233,8 @@ class UserManagement:
"created_at": 0, "created_at": 0,
"updated_at": 0} "updated_at": 0}
# filtering the users and getting all the details # filtering the users and getting all the details
cursor_data = obj_mongo_user.fetch_all_user_details({}, filter_data) cursor_data = obj_mongo_user.fetch_all_user_details({},
filter_data)
cursor_data_count = cursor_data.explain() cursor_data_count = cursor_data.explain()
# counting the total records in the query # counting the total records in the query
if cursor_data_count["executionStats"]["nReturned"] <= 0: if cursor_data_count["executionStats"]["nReturned"] <= 0:
......
...@@ -60,3 +60,6 @@ class MongoStageCreator: ...@@ -60,3 +60,6 @@ class MongoStageCreator:
def regex_stage(self, stage: dict) -> dict: def regex_stage(self, stage: dict) -> dict:
return self.add_stage("$regex", stage) return self.add_stage("$regex", stage)
def not_equal(self, stage: dict) -> dict:
return self.add_stage("$ne", stage)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment