• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

akvo / akvo-mis / #741
89%

Build:
DEFAULT BRANCH: main
Ran 15 Jul 2026 11:19PM UTC
Jobs 1
Files 110
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

15 Jul 2026 11:11PM UTC coverage: 88.481% (+0.04%) from 88.437%
#741

push

coveralls-python

web-flow
[#262] Allow empty answers when syncing draft submissions (#264)

* [#262] Allow empty answers when syncing draft submissions

- Move is_draft parameter parsing earlier in sync_pending_form_data
- Allow empty answers dict only when is_draft=true query param is set
- Add fallback to empty dict when answers is null/missing for drafts
- Add test for blank draft sync (user exits form without entering data)
- Add test to verify non-draft submissions still require answers

This fixes the 400 error when mobile app syncs a draft after user
exits a form without filling any fields.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix is_draft parsing and serializer validation for draft sync endpoint

- Use params.validated_data['is_draft'] instead of re-parsing from
  request.GET, eliminating duplicate logic and potential inconsistency
  (e.g. ?is_draft=TRUE passing serializer but treated as non-draft)
- Remove SyncDeviceFormDataSerializer.validate empty-answers check and
  make answers optional (required=False, default=dict) so the OpenAPI
  schema matches actual behavior: answers optional for drafts, required
  for non-drafts (enforced at view level)

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

5686 of 6594 branches covered (86.23%)

Branch coverage included in aggregate %.

10699 of 11924 relevant lines covered (89.73%)

0.9 hits per line

Coverage Regressions

Lines Coverage ∆ File
3
94.14
1.77% api/v1/v1_mobile/serializers.py
Jobs
ID Job ID Ran Files Coverage
1 #741.1 15 Jul 2026 11:19PM UTC 110
88.48
Source Files on build #741
  • Tree
  • List 110
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 0c220f72 on github
  • Prev Build on main
  • Next Build on main
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc