Ignore non-CORE equity payments when importing from CORE
hopefully a good idea..?
This commit is contained in:
		
							parent
							
								
									01cbffe5a8
								
							
						
					
					
						commit
						bf74ba8108
					
				
					 1 changed files with 11 additions and 0 deletions
				
			
		|  | @ -285,6 +285,17 @@ class MemberEquityPaymentImporter(FromCOREPOS, corepos_importing.model.MemberEqu | |||
|                                                        query=query, | ||||
|                                                        key=key) | ||||
| 
 | ||||
|     def cache_query(self): | ||||
|         query = super().cache_query() | ||||
|         model = self.model | ||||
| 
 | ||||
|         # ignore existing payments not known to be in CORE | ||||
|         # TODO: is this in fact a good idea? | ||||
|         query = query.join(model.CoreMemberEquityPayment)\ | ||||
|                      .filter(model.CoreMemberEquityPayment.corepos_transaction_number != None) | ||||
| 
 | ||||
|         return query | ||||
| 
 | ||||
|     def get_member(self, card_number): | ||||
|         if hasattr(self, 'members_by_card_number'): | ||||
|             return self.members_by_card_number.get(card_number) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Lance Edgar
						Lance Edgar