Skip to content

Conversation

@Anupam-dagar
Copy link
Member

Reference: fossasia/open-event-frontend#3173

Short description of what this resolves:

Currently admin sales fees api response doesn't contains event start date.

Changes proposed in this pull request:

  • Add event start date to the schema of admin sales fee.

Checklist

  • I have read the Contribution & Best practices Guide and my PR follows them.
  • My branch is up-to-date with the Upstream development branch.
  • The unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • All the functions created/modified in this PR contain relevant docstrings.

@codecov
Copy link

codecov bot commented Jul 2, 2019

Codecov Report

Merging #6135 into development will increase coverage by <.01%.
The diff coverage is 66.66%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #6135      +/-   ##
===============================================
+ Coverage        66.38%   66.38%   +<.01%     
===============================================
  Files              286      286              
  Lines            14366    14369       +3     
===============================================
+ Hits              9537     9539       +2     
- Misses            4829     4830       +1
Impacted Files Coverage Δ
app/api/admin_sales/fees.py 90.32% <66.66%> (-2.54%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e71e64c...f65788e. Read the comment docs.

mrsaicharan1
mrsaicharan1 previously approved these changes Jul 3, 2019
Copy link
Member

@mrsaicharan1 mrsaicharan1 left a comment

Choose a reason for hiding this comment

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

Looks good.

[o.get_revenue() for o in obj.orders if o.status == 'completed'])

@staticmethod
def get_eventdate(obj):
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
def get_eventdate(obj):
def get_event_date(obj):

maximum_fee = fields.Float(attribute='maximum_fee')
revenue = fields.Method('calc_revenue')
ticket_count = fields.Method('calc_ticket_count')
event_date = fields.Method('get_eventdate')
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
event_date = fields.Method('get_eventdate')
event_date = fields.Method('get_event_date')

@Anupam-dagar
Copy link
Member Author

@iamareebjamal @mrsaicharan1 This PR is ready for another review.

@iamareebjamal iamareebjamal merged commit c08b22b into fossasia:development Jul 3, 2019
iamareebjamal pushed a commit to iamareebjamal/open-event-server that referenced this pull request Aug 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants