mirror of
				https://github.com/hellosteadman/bambu-buffer.git
				synced 2025-10-31 16:12:19 +00:00 
			
		
		
		
	Fix bug affecting models with the same name in different apps
This commit is contained in:
		
							parent
							
								
									0ac1ce988b
								
							
						
					
					
						commit
						5704abdda5
					
				
					 3 changed files with 4 additions and 6 deletions
				
			
		|  | @ -8,7 +8,7 @@ from datetime import datetime, date | ||||||
| from threading import Thread | from threading import Thread | ||||||
| import requests | import requests | ||||||
| 
 | 
 | ||||||
| __version__ = '2.1' | __version__ = '2.1.1' | ||||||
| 
 | 
 | ||||||
| class BufferThread(Thread): | class BufferThread(Thread): | ||||||
|     def __init__(self, token, data, *args, **kwargs): |     def __init__(self, token, data, *args, **kwargs): | ||||||
|  |  | ||||||
|  | @ -12,7 +12,7 @@ def post_save_receiver(sender, instance, **kwargs): | ||||||
| 
 | 
 | ||||||
|         name = m.pop(0) |         name = m.pop(0) | ||||||
|         app, model = name.lower().split('.') |         app, model = name.lower().split('.') | ||||||
|         if app != instance._meta.app_label and model != instance._meta.module_name: |         if app != instance._meta.app_label or model != instance._meta.module_name: | ||||||
|             continue |             continue | ||||||
| 
 | 
 | ||||||
|         if any(m): |         if any(m): | ||||||
|  |  | ||||||
							
								
								
									
										6
									
								
								setup.py
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								setup.py
									
									
									
									
									
								
							|  | @ -4,7 +4,7 @@ from os import path | ||||||
| 
 | 
 | ||||||
| setup( | setup( | ||||||
|     name = 'bambu-buffer', |     name = 'bambu-buffer', | ||||||
|     version = '2.1', |     version = '2.1.1', | ||||||
|     description = 'Post to Buffer and manage profile settings through a Django-powered site', |     description = 'Post to Buffer and manage profile settings through a Django-powered site', | ||||||
|     author = 'Steadman', |     author = 'Steadman', | ||||||
|     author_email = 'mark@steadman.io', |     author_email = 'mark@steadman.io', | ||||||
|  | @ -12,9 +12,7 @@ setup( | ||||||
|     long_description = open(path.join(path.dirname(__file__), 'README')).read(), |     long_description = open(path.join(path.dirname(__file__), 'README')).read(), | ||||||
|     packages = [ |     packages = [ | ||||||
|         'bambu_buffer', |         'bambu_buffer', | ||||||
|         'bambu_buffer.migrations', |         'bambu_buffer.migrations' | ||||||
|         'bambu_buffer.management', |  | ||||||
|         'bambu_buffer.management.commands' |  | ||||||
|     ], |     ], | ||||||
|     package_data = { |     package_data = { | ||||||
|         'bambu_buffer': [ |         'bambu_buffer': [ | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue