[Python] 'QuerySet' object has no attribute 'save' using django

Discussão em 'Python' iniciado por Stack, Fevereiro 3, 2025.

  1. Stack

    Stack Membro Participativo

    opportunity = Opportunity.objects.filter(created_by__client=client, id=pk).exclude(is_deleted=True)

    for opp in opportunity:
    id = opp.id
    name = opp.name
    contact = opp.contact.id

    project = Project.objects.filter(client=client)
    project.opportunity = id
    project.name = name
    project.contact = contact

    project.save()

    Continue reading...

Compartilhe esta Página