<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>12818</bug_id>
          
          <creation_ts>2018-06-28 00:31:39 +0000</creation_ts>
          <short_desc>Remove orphaned imported layers when project is deleted</short_desc>
          <delta_ts>2018-08-26 05:54:42 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>Toaster</product>
          <component>toaster</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.6 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David Reyna">david.reyna</reporter>
          <assigned_to name="David Reyna">david.reyna</assigned_to>
          <cc>jessica.zhang</cc>
    
    <cc>stanciux.mihail</cc>
          
          <qa_contact name="Toaster default assignee">toaster</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>80938</commentid>
    <comment_count>0</comment_count>
    <who name="David Reyna">david.reyna</who>
    <bug_when>2018-06-28 00:31:39 +0000</bug_when>
    <thetext>Imported layers are indirectly attached to projects via a Layer_Version record.

When a delete is performed on a project, Django will perform the deep delete on all related records, but it cannot find these related imported layer objects. This results in orphaned layers that can block re-adding that layer subsequently (because names must be unique).

The project delete method needs to capture those layers to delete before the project is deleted, and then explicitly delete then (as long as they are not referenced by other projects).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81436</commentid>
    <comment_count>1</comment_count>
    <who name="David Reyna">david.reyna</who>
    <bug_when>2018-08-26 05:54:42 +0000</bug_when>
    <thetext>commit 08fbdc02e32d715ae94e3b9603fb3ec8351c8fd3</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>