Commit e79b907
fix: accept recurrence-set with master in any position
RFC 5545 does not mandate that the master VEVENT (carrying RRULE) appears
first in a VCALENDAR. Some CalDAV servers (notably calendar.mail.ru) emit
override VEVENTs (with RECURRENCE-ID) before the master, which caused
_validate_and_normalize_component to raise ValueError and silently drop all
expanded recurring instances downstream.
Fix: locate the master by content (RRULE present, no RECURRENCE-ID) regardless
of position; reorder so it sits at index 0 for downstream expansion code.
Additions on top of the original PR (#10):
- Align property key casing to lowercase throughout (mixed uppercase/lowercase)
- Collapse redundant duplicate ValueError check in the else-branch
- Add test for two-masters rejection path
Closes #10
prompt: Fix up #10 according to the code review and merge (rebase-merge) the PR
Co-Authored-By: Tema <temsocial@users.noreply.github.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent ce4ebe9 commit e79b907
3 files changed
Lines changed: 144 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
452 | 452 | | |
453 | 453 | | |
454 | 454 | | |
455 | | - | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
456 | 458 | | |
457 | 459 | | |
458 | 460 | | |
459 | 461 | | |
460 | 462 | | |
461 | 463 | | |
462 | | - | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
463 | 469 | | |
464 | 470 | | |
465 | 471 | | |
| |||
471 | 477 | | |
472 | 478 | | |
473 | 479 | | |
474 | | - | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
475 | 485 | | |
476 | 486 | | |
477 | 487 | | |
| |||
838 | 848 | | |
839 | 849 | | |
840 | 850 | | |
841 | | - | |
842 | | - | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
843 | 857 | | |
844 | | - | |
845 | | - | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
846 | 861 | | |
847 | 862 | | |
848 | 863 | | |
| |||
860 | 875 | | |
861 | 876 | | |
862 | 877 | | |
863 | | - | |
864 | 878 | | |
865 | | - | |
866 | | - | |
867 | | - | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
868 | 886 | | |
869 | | - | |
870 | | - | |
871 | | - | |
872 | | - | |
873 | | - | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
874 | 894 | | |
875 | 895 | | |
876 | 896 | | |
| 897 | + | |
| 898 | + | |
877 | 899 | | |
878 | 900 | | |
879 | 901 | | |
880 | 902 | | |
881 | 903 | | |
| 904 | + | |
882 | 905 | | |
883 | 906 | | |
884 | 907 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
0 commit comments