question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

After deleting resources, they are still annotated as non-importable when selecting them to re-import

See original GitHub issue

Observed behavior

Watch this video of me deleting, then re-importing content from Touchable Earth.

Steps:

  1. I delete all the contents of a topic (but not the entire topic itself)
  2. I wait for the deletion task to finish
  3. I go back to TE > Import more
  4. I go to the topic and it is flagged as non-importable (the checkbox is disabled)
  5. But if I follow the link into the topic, the child nodes are flagged as importable.

CleanShot 2021-04-16 at 16 31 03

CleanShot 2021-04-16 at 16 30 55

Expected behavior

After deleting objects, if I go back to re-import them, the topic node is properly annotated as “importable”

Root cause

My suspiscion is that there is something wrong in the ContentNodeGranular viewset. It may have to do with caching.

Steps to reproduce

Do something similar to the instructions in “Observed Behavior”

Context

Kolibri 0.14.7

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
rtibblescommented, Apr 27, 2021

In that case, we need to update the earlier update to available=False, on_device_resources=0 - that would seem to account for it!

0reactions
kmrinal19commented, Apr 26, 2021

This is taken into account by this line: https://github.com/learningequality/kolibri/blob/0c2b49a5e7d7df399216119f96098d48e3554b76/kolibri/core/content/utils/annotation.py#L552

Here, all topics in a channel are first marked as not available, so only those with any descendants are marked as available.

Since all the topics are first marked as not available, and only those with any descendants are updated later, the topics without any descendants have the on_device_resources field unchanged. In the frontend, the checkbox is disabled when the condition on_device_resources === total_resources holds true. Since the on_device_resources field is unchanged in the backend, we are unable to import the topic from the frontend. https://github.com/learningequality/kolibri/blob/0c2b49a5e7d7df399216119f96098d48e3554b76/kolibri/plugins/device/assets/src/views/SelectContentPage/treeViewUtils.js#L87-L94

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to import already imported photos aft… - Apple Community
I Imported a large photo folder to my Albums. Then I deleted the photo folder so I can re-import them again but this...
Read more >
QBs Online re-importing deleted transactions - QuickBooks
I have gone through the process of selecting and "excluding" all transactions which did not belong AND then deleting all of these "excluded" ......
Read more >
No effect on data sources when you delete metadata ... - IBM
The data source is never affected by import or deletion of metadata. Therefore, even if you delete metadata, you can reimport the same...
Read more >
Bringing existing resources into CloudFormation management
You can manage your resources using AWS CloudFormation regardless of where they were created without having to delete and re-create them as part...
Read more >
ATLAS.ti Updates
Improved transcript timestamp import reliability. Fixed a crash in analysis tables. Fixed a selection issue in the code cooccurrence table. Fixed an issue...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found