Accept null file_size in AttachmentDto#6463
Conversation
PR checklist ✅All required conditions are satisfied:
🎉 Great job! This PR is ready for review. |
SDK Size Comparison 📏
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
WalkthroughThe PR makes ChangesAttachment file_size null-safety handling
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|



Goal
Backport of #6462 to
v6.It seems that backend can return
nullforfile_sizeon attachments, butAttachmentDto.file_sizewas non-nullable so explicit nulls in the JSON caused deserialization to fail.This also aligns with iOS, where
AttachmentFiledecodes a missing or non-decodablefile_sizeas0.Closes #6428
Implementation
AttachmentDto.file_sizeis nowInt?, so an explicitnullfrom the API deserializes cleanly.DomainMappingmapsnullto0when mapping to the domainAttachment.fileSize.Testing
Deserialize JSON attachment with null file_sizecovers the parser path.Summary by CodeRabbit