reverted incorrect guarding which removed the whole point of promote_proposal and ensured it was never called
This commit is contained in:
		
							parent
							
								
									842686bb8e
								
							
						
					
					
						commit
						d02e7f83c6
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		|  | @ -308,7 +308,7 @@ class ResultNotification(models.Model): | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| def promote_proposal(proposal): | def promote_proposal(proposal): | ||||||
|      |     print "promote", proposal | ||||||
|     if hasattr(proposal, "presentation") and proposal.presentation: |     if hasattr(proposal, "presentation") and proposal.presentation: | ||||||
|         # already promoted |         # already promoted | ||||||
|         presentation = proposal.presentation |         presentation = proposal.presentation | ||||||
|  | @ -330,13 +330,13 @@ def promote_proposal(proposal): | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| def unpromote_proposal(proposal): | def unpromote_proposal(proposal): | ||||||
|      |     print "unpromote" | ||||||
|     if hasattr(proposal, "presentation") and proposal.presentation: |     if hasattr(proposal, "presentation") and proposal.presentation: | ||||||
|         proposal.presentation.delete() |         proposal.presentation.delete() | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| def accepted_proposal(sender, instance=None, **kwargs): | def accepted_proposal(sender, instance=None, **kwargs): | ||||||
|     if instance is None or not hasattr(instance, "presentation"): |     if instance is None: | ||||||
|         return |         return | ||||||
|     if instance.status == "accepted": |     if instance.status == "accepted": | ||||||
|         promote_proposal(instance.proposal) |         promote_proposal(instance.proposal) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 James Tauber
						James Tauber