Exemple #1
0
def job_view(body):
    if "uuid" not in body or "user_id" not in body:
        return

    job = Job.select().where(Job.job_uuid==body["uuid"]).first()
    if not job or job.user_id != body["user_id"]:
        return
    job.last_view_time = utils.now()
    job.save()

    qs = Proposal.update(is_view=True).where(Proposal.job==job)
    qs.execute()
    return