Skip to content

Add original_channel_name annotation in ContentNode search viewset#2680

Merged
jredrejo merged 1 commit intolearningequality:developfrom
jredrejo:add_missing_original_channel_name
Dec 12, 2020
Merged

Add original_channel_name annotation in ContentNode search viewset#2680
jredrejo merged 1 commit intolearningequality:developfrom
jredrejo:add_missing_original_channel_name

Conversation

@jredrejo
Copy link
Copy Markdown
Member

@jredrejo jredrejo commented Dec 11, 2020

Description

An annotated field, original_channel_name, had been incorrectly removed for the ContentNode search as it seemed useless, but it happened to be used sometimes

Issue Addressed (if applicable)

Closes: #2672

Steps to Test

When editing a channel, if a content node being the root of the channel is hit by the search , there should not be error retrieving the channel name instead of the node title.

Implementation Notes (optional)

As the annotation is added after paginating, perfomance impact should be minimal.

@jredrejo jredrejo requested a review from rtibbles December 11, 2020 17:21
@rtibbles
Copy link
Copy Markdown
Member

Removing it and adding it back has the significant advantage of including @bjester's update that made sure this always returned the correct result with Coalesce - a silver lining!

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 11, 2020

Codecov Report

Merging #2680 (4a08358) into develop (a81e7d4) will decrease coverage by 0.00%.
The diff coverage is 50.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2680      +/-   ##
===========================================
- Coverage    85.14%   85.14%   -0.01%     
===========================================
  Files          299      299              
  Lines        15077    15079       +2     
===========================================
+ Hits         12838    12839       +1     
- Misses        2239     2240       +1     
Impacted Files Coverage Δ
contentcuration/search/viewsets/contentnode.py 52.99% <50.00%> (-0.06%) ⬇️

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 29ecd2c...4a08358. Read the comment docs.

@jredrejo jredrejo merged commit 541e175 into learningequality:develop Dec 12, 2020
@jredrejo jredrejo deleted the add_missing_original_channel_name branch December 12, 2020 18:34
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.

KeyError: 'original_channel_name' in search endpoint

2 participants