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

OpenTreeMap / otm-core / 2388
83%
develop: 84%

Build:
Build:
LAST BUILD BRANCH: dependabot/npm_and_yarn/sockjs-0.3.21
DEFAULT BRANCH: develop
Ran 16 Jan 2017 07:21PM UTC
Jobs 1
Files 190
Run time 9s
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

pending completion
2388

Pull #2939

travis-ci

web-flow
Include always-writable fields in data returned by API "Instance info" endpoint

When creating or updating a tree, the iOS app sends only fields known to be writable by the current user. Previously all writable fields had DB `FieldPermission` objects, but after some recent changes that is no longer true for `plot.geom`. So for newly-created treemaps users can't create trees with the iOS app because `plot.geom` is not posted to the back end.

We now have a well-defined category of "always-writable" fields, which includes `plot.geom`. So,including always-writable fields in the data returned by the API "Instance info" endpoint allows the iOS app to once again post `plot.geom` to the back end.

I abstracted the function `add_perms` from the current code (without changes), and call it twice -- once with `FieldPermission` objects from the database (as before) and once with `FieldPermission` objects temporarily constructed from `always_writable` fields.

Connects OpenTreeMap/otm-ios#337
Pull Request #2939: Include always-writable fields in data returned by API "Instance info" endpoint

15515 of 18628 relevant lines covered (83.29%)

0.83 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
100.0
treemap/management/commands/random_trees.py
1
100.0
treemap/lib/map_feature.py
3
100.0
api/instance.py
6
100.0
treemap/decorators.py
8
100.0
treemap/tests/test_map_feature.py
10
100.0
treemap/exceptions.py
10
100.0
treemap/tests/test_views.py
10
100.0
treemap/views/user.py
13
100.0
treemap/search_fields.py
17
100.0
treemap/templatetags/form_extras.py
38
100.0
treemap/models.py
39
100.0
treemap/instance.py
41
100.0
treemap/audit.py
69
100.0
otm1_migrator/model_processors.py
Jobs
ID Job ID Ran Files Coverage
1 2388.1 16 Jan 2017 07:21PM UTC 0
83.29
Travis Job 2388.1
Source Files on build 2388
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #2388
  • Pull Request #2939
  • PR Base - hotfix/2.13.1 (#2387)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc