Skip to content

Context being lost since new version of mailing_contact #19

@rossthom

Description

@rossthom

Context "syncing=True" seems to be lost somewhere while writing a mailing_contact.

Module

mass_mailing_partner (in interaction with mass_mailing_list_dynamic)

Describe the bug

When calling action_sync, mailing_contact are written with the context 'syncing=True'.
This triggers _check_no_manual_edits_on_fully_synced_lists() (back from mass_mailing_list_dynamic) but it is missing the "syncing=True" context.

To Reproduce

Latest version

Steps to reproduce the behavior:

  1. Create a dynamic mailing list, chose the second sync. method (full)
  2. Click on "Sync Now"
  3. The ValidationError from _check_no_manual_edits_on_fully_synced_lists() is triggered because the context 'syncing=True' got lost while writing the mailing_contact.

Expected behavior
The context "syncing=True" should be kept active, bypassing the raise of the Validationerror from _check_no_manual_edits_on_fully_synced_lists()

Additional context
Attached is a previous version of mass_mailing_partner/models/mailing_contact.py that didn't drop the 'syncing=True' context

MMP_mailing_contact_BEFORE.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions