Skip to content

Commit

Permalink
use exists instead of evaluating the whole queryset
Browse files Browse the repository at this point in the history
  • Loading branch information
John Tordoff committed Oct 24, 2023
2 parents b91536e + f1af4ad commit 1ae8f29
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def test_detail_view_returns_editable_fields_no_specified_node(self, app, user):
res = app.get(url, auth=user.auth, expect_errors=True)
attributes = res.json['data']['attributes']

assert attributes['title'] == 'Untitled'
assert attributes['title'] == ''
assert attributes['description'] == ''
assert attributes['category'] == ''
assert attributes['node_license'] is None
Expand Down
1 change: 1 addition & 0 deletions website/settings/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -2129,3 +2129,4 @@ def from_node_usage(cls, usage_bytes, private_limit=None, public_limit=None):
PREPRINT_METRICS_START_DATE = datetime.datetime(2019, 1, 1)

WAFFLE_VALUES_YAML = 'osf/features.yaml'
DEFAULT_DRAFT_NODE_TITLE = 'Untitled'

0 comments on commit 1ae8f29

Please sign in to comment.