Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
course-discovery
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
course-discovery
Commits
a2584520
Commit
a2584520
authored
Jun 10, 2017
by
Waheed Ahmed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix empty start date.
ECOM-7869
parent
27d4b669
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
course_discovery/apps/publisher/views.py
+4
-2
No files found.
course_discovery/apps/publisher/views.py
View file @
a2584520
...
@@ -186,6 +186,7 @@ class CourseRunDetailView(mixins.LoginRequiredMixin, mixins.PublisherPermissionM
...
@@ -186,6 +186,7 @@ class CourseRunDetailView(mixins.LoginRequiredMixin, mixins.PublisherPermissionM
if
history_object
:
if
history_object
:
context
[
'publish_date'
]
=
history_object
.
modified
context
[
'publish_date'
]
=
history_object
.
modified
start_date
=
course_run
.
start
.
strftime
(
"
%
B
%
d,
%
Y"
)
if
course_run
.
start
else
None
context
[
'breadcrumbs'
]
=
make_bread_crumbs
(
context
[
'breadcrumbs'
]
=
make_bread_crumbs
(
[
[
(
reverse
(
'publisher:publisher_courses'
),
'Courses'
),
(
reverse
(
'publisher:publisher_courses'
),
'Courses'
),
...
@@ -194,7 +195,7 @@ class CourseRunDetailView(mixins.LoginRequiredMixin, mixins.PublisherPermissionM
...
@@ -194,7 +195,7 @@ class CourseRunDetailView(mixins.LoginRequiredMixin, mixins.PublisherPermissionM
course_run
.
course
.
title
course_run
.
course
.
title
),
),
(
None
,
'{type}: {start}'
.
format
(
(
None
,
'{type}: {start}'
.
format
(
type
=
course_run
.
get_pacing_type_display
(),
start
=
course_run
.
start
.
strftime
(
"
%
B
%
d,
%
Y"
)
type
=
course_run
.
get_pacing_type_display
(),
start
=
start_date
))
))
]
]
)
)
...
@@ -696,12 +697,13 @@ class CourseRunEditView(mixins.LoginRequiredMixin, mixins.PublisherPermissionMix
...
@@ -696,12 +697,13 @@ class CourseRunEditView(mixins.LoginRequiredMixin, mixins.PublisherPermissionMix
)
)
context
[
'seat_form'
]
=
self
.
seat_form
(
instance
=
course_run
.
seats
.
first
())
context
[
'seat_form'
]
=
self
.
seat_form
(
instance
=
course_run
.
seats
.
first
())
start_date
=
course_run
.
start
.
strftime
(
"
%
B
%
d,
%
Y"
)
if
course_run
.
start
else
None
context
[
'breadcrumbs'
]
=
make_bread_crumbs
(
context
[
'breadcrumbs'
]
=
make_bread_crumbs
(
[
[
(
reverse
(
'publisher:publisher_courses'
),
'Courses'
),
(
reverse
(
'publisher:publisher_courses'
),
'Courses'
),
(
reverse
(
'publisher:publisher_course_detail'
,
kwargs
=
{
'pk'
:
course
.
id
}),
course
.
title
),
(
reverse
(
'publisher:publisher_course_detail'
,
kwargs
=
{
'pk'
:
course
.
id
}),
course
.
title
),
(
None
,
'{type}: {start}'
.
format
(
(
None
,
'{type}: {start}'
.
format
(
type
=
course_run
.
get_pacing_type_display
(),
start
=
course_run
.
start
.
strftime
(
"
%
B
%
d,
%
Y"
)
type
=
course_run
.
get_pacing_type_display
(),
start
=
start_date
))
))
]
]
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment