def get_by_email(email):
     volunteer_collection = VolunteersService.get_collection()
     return BaseMongo.find_one(volunteer_collection, {'emailId': email})
 def get_volunteer_id_by_phone_no(phone_no):
     volunteer_collection = VolunteersService.get_collection()
     return BaseMongo.find_one(volunteer_collection, {'phoneNo': phone_no})
Beispiel #3
0
 def is_report_present(issue_id, reporter_id):
     collection = IssueReportsService.get_collection()
     filters = {'issue_id': issue_id, "reporter_id": reporter_id}
     return BaseMongo.find_one(collection, filters)
 def get_by_id(volunteer_id):
     volunteer_collection = VolunteersService.get_collection()
     return BaseMongo.find_one(volunteer_collection,
                               {'_id': ObjectId(volunteer_id)})
Beispiel #5
0
 def is_acknowledgement_present(issue_id, volunteer_id):
     collection = IssuesAcknowledgementsService.get_collection()
     filters = {'issue_id': issue_id, "volunteer_id": volunteer_id}
     return BaseMongo.find_one(collection, filters)
 def get_by_id(issue_id):
     essential_collection = IssuesService.get_collection()
     essentials = BaseMongo.find_one(essential_collection, {'_id': ObjectId(issue_id)})
     return essentials
Beispiel #7
0
 def get_by_phone_no(phone_no):
     collection = ReportersService.get_collection()
     return BaseMongo.find_one(collection, {'phoneNo': phone_no})
 def is_plus_one_present(issue_id, victim_id):
     collection = IssuesPlusOneService.get_collection()
     filters = {'issue_id': issue_id, "victim_id": victim_id}
     return BaseMongo.find_one(collection, filters)
Beispiel #9
0
 def get_by_id(victim_id):
     collection = ReportersService.get_collection()
     return BaseMongo.find_one(collection, {'_id': ObjectId(victim_id)})
 def get_by_id(essential_id):
     collection = EssentialsService.get_collection()
     return BaseMongo.find_one(collection, {'_id': ObjectId(essential_id)})
 def get(name):
     essential_collection = EssentialsService.get_collection()
     essentials = BaseMongo.find_one(essential_collection,
                                     {'name': name.lower()})
     return essentials
Beispiel #12
0
 def get(donar_id):
     collection = DonateService.get_collection()
     filters = {'donatedBy': donar_id}
     return BaseMongo.find_one(collection, filters)
 def get_by_id(donor_id):
     collection = DonarsService.get_collection()
     return BaseMongo.find_one(collection, {'_id': ObjectId(donor_id)})