Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event update does not work correctly #1356

Open
ShilovMax opened this issue Feb 12, 2025 · 1 comment
Open

Event update does not work correctly #1356

ShilovMax opened this issue Feb 12, 2025 · 1 comment

Comments

@ShilovMax
Copy link

ShilovMax commented Feb 12, 2025

Hi!
I am creating a booking in exchange(I am using outlook web app) and then pulling it into the code

    events = account.calendar.view(start=start, end=end)

and everything is great, events are coming in. If I change the name of the event in exchange, it will be pulled into python.

event.subject=New Subjectevent.save(update_fields=['subject'])

But if I change the name of the event from the code, it is not displayed in exchange itself, although if I get calendar.view() it will have a new name.

I try to update attendee

simple_attendee = Attendee(
    mailbox=Mailbox(
        name='SomeName',
        email_address='SomeEmail,
        routing_type='SMTP',
        mailbox_type='Mailbox',
        item_id=None,
    ),
    response_type='Unknown',
    last_response_time=None,
    proposed_start=None,
    proposed_end=None,
)

event.required_attendees.append(simple_attendee)
event.save(update_fields=['required_attendees'])

But I get an error

exchangelib.errors.ErrorInvalidPropertySet:  Set action is invalid for property. (field: FieldURI(field_uri='calendar:RequiredAttendees'))

How can I solve this problem?

@ecederstrand
Copy link
Owner

ecederstrand commented Feb 24, 2025

This might be because the item you are trying to change is an occurrence and not either a master item or a non-recurring item. I'm not sure required_attendees update is possible on a single occurrence of a recurring item.

Can you verify whether required_attendees works for the other two item types?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants