GetOccurrences method is returning deleted events

I am using the GetOccurrences method in my code to grab occurrences in my events - however if there are deleted events that appear in the database such as in the image below then they still appear…

How do I prevent deleted events from appearing?

Please note the occurrences are displayed correctly in the calendar (the deleted ones are not shown) but when I returning just a list in a view using GetOccurences as a filter on my query it is still displaying deleted events.

Using C# NET MVC 4, etc.

Hello,
thanks for reporting, we are currently trying to reproduce the issue. I’ll give you an update tomorrow

I got round this by looping through the occurrences and then checking if there were any ‘deleted’ events… but not sure this is an elegant solution?

var isDeleted = _userSchedulerService.GetRelatedSchedules(recur.Id) .Count(x => x.start_date == recur.start_date && x.end_date == recur.end_date && x.rec_type == "none");

Hi,
we’ve confirmed a bug, the result dataset should not contain items with ‘rec_type’=‘none’.
The fixed version of the DLL will be available tomorrow, we’ll update it on NuGet and on the site.

Thanks :smiley: