import mlab
from models.service import Service

mlab.connect()

# all_services = Service.objects()
#
# first_service = all_services[0]
#
# print(first_service.name)

id_to_find = "5a956301308e841354e3d00d"

service = Service.objects().with_id(id_to_find)

print(service.to_mongo())

if service is not None:
    # service.delete()
    service.update(set__status=False)
    service.reload()
    print(service.to_mongo())
else:
    print("not found")

661c016d94d9dea238ecd0ce3f32574346ef3752
<mask token>

<mask token>
mlab.connect()
<mask token>
print(service.to_mongo())
if service is not None:
    service.update(set__status=False)
    service.reload()
    print(service.to_mongo())
else:
    print('not found')

<mask token>
mlab.connect()
id_to_find = '5a956301308e841354e3d00d'
service = Service.objects().with_id(id_to_find)
print(service.to_mongo())
if service is not None:
    service.update(set__status=False)
    service.reload()
    print(service.to_mongo())
else:
    print('not found')

import mlab
from models.service import Service
mlab.connect()
id_to_find = '5a956301308e841354e3d00d'
service = Service.objects().with_id(id_to_find)
print(service.to_mongo())
if service is not None:
    service.update(set__status=False)
    service.reload()
    print(service.to_mongo())
else:
    print('not found')

import mlab
from models.service import Service

mlab.connect()

# all_services = Service.objects()
#
# first_service = all_services[0]
#
# print(first_service.name)

id_to_find = "5a956301308e841354e3d00d"

service = Service.objects().with_id(id_to_find)

print(service.to_mongo())

if service is not None:
    # service.delete()
    service.update(set__status=False)
    service.reload()
    print(service.to_mongo())
else:
    print("not found")
