Repository: fossasia/open-event-server

Issue:
Wrong Information in REST API for FOSSASIA 2017 Summit
API end point : `https://eventyay.com/api/v1/events/6`

 - [x]  Correct the copyright licence from `Attribution` to `Creative Commons Attribution License.`
      Issue : https://github.com/fossasia/open-event-webapp/issues/1063
 - [x]  Correct the Ticket URL from `https://eventyay.com/e/45da88b7/tickets/` to `https://eventyay.com/e/45da88b7/` 
     Issue: https://github.com/fossasia/open-event-webapp/issues/1067
@niranjan94 @SaptakS  Please help regarding this.


Discussion:

Resolving patch:
diff --git a/app/helpers/wizard/event.py b/app/helpers/wizard/event.py
--- a/app/helpers/wizard/event.py
+++ b/app/helpers/wizard/event.py
@@ -177,7 +177,7 @@ def save_event_from_json(json, event_id=None):
     event.ticket_include = event_data['ticket_include']
 
     if event.ticket_include:
-        event.ticket_url = url_for('event_detail.display_event_tickets', identifier=event.identifier, _external=True)
+        event.ticket_url = url_for('event_detail.display_event_detail_home', identifier=event.identifier, _external=True)
         save_tickets(event_data['tickets'], event)
     else:
         event.ticket_url = event_data['ticket_url']
diff --git a/app/views/public/event_detail.py b/app/views/public/event_detail.py
--- a/app/views/public/event_detail.py
+++ b/app/views/public/event_detail.py
@@ -501,39 +501,6 @@ def display_event_coc(identifier):
                            custom_placeholder=custom_placeholder,
                            call_for_speakers=call_for_speakers)
 
-
-@event_detail.route('/<identifier>/tickets/')
-def display_event_tickets(identifier):
-    event = get_published_event_or_abort(identifier)
-    placeholder_images = DataGetter.get_event_default_images()
-    if event.sub_topic:
-        custom_placeholder = DataGetter.get_custom_placeholder_by_name(event.sub_topic)
-    elif event.topic:
-        custom_placeholder = DataGetter.get_custom_placeholder_by_name(event.topic)
-    else:
-        custom_placeholder = DataGetter.get_custom_placeholder_by_name('Other')
-    if event.copyright:
-        licence_details = DataGetter.get_licence_details(event.copyright.licence)
-    else:
-        licence_details = None
-    module = DataGetter.get_module()
-    tickets = DataGetter.get_sales_open_tickets(event.id, True)
-    accepted_sessions_count = get_count(DataGetter.get_sessions(event.id))
-    timenow_event_tz = datetime.now(pytz.timezone(event.timezone))
-    fees = DataGetter.get_fee_settings_by_currency(event.payment_currency)
-    return render_template('gentelella/guest/event/details.html',
-                           event=event,
-                           placeholder_images=placeholder_images,
-                           custom_placeholder=custom_placeholder,
-                           accepted_sessions_count=accepted_sessions_count,
-                           licence_details=licence_details,
-                           module=module,
-                           timenow_event_tz=timenow_event_tz,
-                           current_timezone=get_current_timezone(),
-                           tickets=tickets if tickets else [],
-                           fees=fees)
-
-
 # SLUGGED PATHS
 
 @event_detail.route('/<identifier>/<slug>/')


Test patch: