SG-44680 Prevent downloading and copy ref link for container assets - #160
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## ticket/sg-43935/data-model-create-update #160 +/- ##
=========================================================================
Coverage 17.80% 17.80%
=========================================================================
Files 32 32
Lines 3179 3179
=========================================================================
Hits 566 566
Misses 2613 2613
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| try: | ||
| result = download_revision(flow_revision_id) | ||
| except DownloadRevisionError as exc: | ||
| if 'Component of purpose "source" does not exist on revision.' in str(exc): | ||
| QtGui.QMessageBox.warning( | ||
| None, | ||
| "Warning", | ||
| "This asset has no binaries to download.", | ||
| ) | ||
| return | ||
| raise |
There was a problem hiding this comment.
I'm assuming we can't actually get here now that we've added the download filter on the actions. This is just for extra safety?
There was a problem hiding this comment.
Yes, extra safety. This was the first iteration of the fix. But I don't think it will hurt. Do you think it's better to remove it?
There was a problem hiding this comment.
No I like it - just in case!
yungsiow
left a comment
There was a problem hiding this comment.
Personally I would ignore case when alphabetizing, but not a huge deal. Looks good, thanks Charlie!
Base branch: #149
Adds validation to prevent displaying "download" and "copy reference link" for asset containers (root assets) Introduced on the component.VariantSet data model.