Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1188 remove x total #1290

Merged
merged 10 commits into from
Mar 27, 2018
Merged

1188 remove x total #1290

merged 10 commits into from
Mar 27, 2018

Conversation

Wambere
Copy link
Contributor

@Wambere Wambere commented Mar 14, 2018

Part of #1188

@@ -132,42 +132,34 @@ def data(self, request, **kwargs):
qs_kwargs.update({'id__gt': gt_id})

instances = Instance.objects.filter(**qs_kwargs).order_by('pk')
length = self.total_count = instances.count()
self.total_count = instances.count()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be in-lined into the count conditinoal on line 138 so we don't calculate it by default


if count:
self.total_count = instances.count()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we even need to set a class variable here? Why not put instances.count() inline as the value below?

"""
Generator function to stream JSON data
"""

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove blank line, other functions do not have a line between docstring and code

@Wambere Wambere force-pushed the 1188-remove-x-total branch 2 times, most recently from 4dac099 to 54df22b Compare March 19, 2018 11:09
@ukanga ukanga merged commit e2520ab into master Mar 27, 2018
@ukanga ukanga deleted the 1188-remove-x-total branch April 4, 2018 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants