Hi Aline,
You would need to create both the event and the related project and/or users within the same transaction, e.g:
ce=session.create('CalendarEvent',{'name':'TEST_PIPELINE','start': arrow.get('2021-08-25'),'end': arrow.get('2021-08-31')})
user=session.query('User where username is "aline3d"').first()
event = session.create('CalendarEventResource',{'calendar_event_id':ce['id'],'resource_id':user['id']})
session.commit()
Cheers
/Henrik
Hi,
I verified your code and could not get the issue you are reporting (testing on 4.7.0.current.13.277). Could you please create a ticket at support@ftrack.com and supply your ftrack details - ftrack url (and version, if onprem).