python.exe : [2026-05-15 00:09:04,475] DEBUG asyncio Using selector: SelectSelector At line:1 char:69 + ... m\backend"; &'c:\Users\DN761673\Downloads\TWM_New\.venv\Scripts\pytho ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: ([2026-05-15 00:... SelectSelector :String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError [2026-05-15 00:09:07,331] INFO apps.business.binary_tree.services.binary_service [BINARY_PLACEMENT] placed distributor=c48b607d-d180-4273-b6e3-38cfc8e3e6c7 parent=4304289a-21ce-41c1-8b0c-9878bd120d43 position=LEFT depth=9 ==================================================================================================== COMPREHENSIVE TRANSFER TEST: Pre/Post Benefit Verification ==================================================================================================== [SETUP] Cleaned transfer data ==================================================================================================== TEST SCENARIO 1: PowerStream-Active ID with Pre-Transfer Powerstream Bonuses ==================================================================================================== Traceback (most recent call last): File "C:\Users\DN761673\Downloads\TWM_New\.venv\Lib\site-packages\django\db\b ackends\utils.py", line 105, in _execute return self.cursor.execute(sql, params) ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^ File "C:\Users\DN761673\Downloads\TWM_New\.venv\Lib\site-packages\django\db\b ackends\sqlite3\base.py", line 359, in execute return super().execute(query, params) ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^ sqlite3.IntegrityError: NOT NULL constraint failed: distributor_distributorrewardownershipledger.ownership_period_id The above exception was the direct cause of the following exception: Traceback (most recent call last): File "C:\Users\DN761673\Downloads\TWM_New\truewave-platform\backend\manage.py", line 23, in main() ~~~~^^ File "C:\Users\DN761673\Downloads\TWM_New\truewave-platform\backend\manage.py", line 19, in main execute_from_command_line(sys.argv) ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^ File "C:\Users\DN761673\Downloads\TWM_New\.venv\Lib\site-packages\django\core \management\__init__.py", line 443, in execute_from_command_line utility.execute() ~~~~~~~~~~~~~~~^^ File "C:\Users\DN761673\Downloads\TWM_New\.venv\Lib\site-packages\django\core \management\__init__.py", line 437, in execute self.fetch_command(subcommand).run_from_argv(self.argv) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ File "C:\Users\DN761673\Downloads\TWM_New\.venv\Lib\site-packages\django\core \management\base.py", line 420, in run_from_argv self.execute(*args, **cmd_options) ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\DN761673\Downloads\TWM_New\.venv\Lib\site-packages\django\core \management\base.py", line 464, in execute output = self.handle(*args, **options) File "C:\Users\DN761673\Downloads\TWM_New\truewave-platform\backend\apps\busi ness\distributor\management\commands\test_transfer_comprehensive.py", line 55, in handle DistributorRewardOwnershipLedger.objects.create( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ distributor=ps_dist, ^^^^^^^^^^^^^^^^^^^^ ...<4 lines>... reward_timestamp=timezone.now(), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "C:\Users\DN761673\Downloads\TWM_New\.venv\Lib\site-packages\django\db\m odels\manager.py", line 87, in manager_method return getattr(self.get_queryset(), name)(*args, **kwargs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^ File "C:\Users\DN761673\Downloads\TWM_New\.venv\Lib\site-packages\django\db\m odels\query.py", line 669, in create obj.save(force_insert=True, using=self.db) ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\DN761673\Downloads\TWM_New\.venv\Lib\site-packages\django\db\m odels\base.py", line 874, in save self.save_base( ~~~~~~~~~~~~~~^ using=using, ^^^^^^^^^^^^ ...<2 lines>... update_fields=update_fields, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "C:\Users\DN761673\Downloads\TWM_New\.venv\Lib\site-packages\django\db\m odels\base.py", line 966, in save_base updated = self._save_table( raw, ...<4 lines>... update_fields, ) File "C:\Users\DN761673\Downloads\TWM_New\.venv\Lib\site-packages\django\db\m odels\base.py", line 1169, in _save_table results = self._do_insert( cls._base_manager, using, insert_fields, returning_fields, raw ) File "C:\Users\DN761673\Downloads\TWM_New\.venv\Lib\site-packages\django\db\m odels\base.py", line 1220, in _do_insert return manager._insert( ~~~~~~~~~~~~~~~^ [self], ^^^^^^^ ...<3 lines>... raw=raw, ^^^^^^^^ ) ^ File "C:\Users\DN761673\Downloads\TWM_New\.venv\Lib\site-packages\django\db\m odels\manager.py", line 87, in manager_method return getattr(self.get_queryset(), name)(*args, **kwargs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^ File "C:\Users\DN761673\Downloads\TWM_New\.venv\Lib\site-packages\django\db\m odels\query.py", line 1918, in _insert return query.get_compiler(using=using).execute_sql(returning_fields) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^ File "C:\Users\DN761673\Downloads\TWM_New\.venv\Lib\site-packages\django\db\m odels\sql\compiler.py", line 1925, in execute_sql cursor.execute(sql, params) ~~~~~~~~~~~~~~^^^^^^^^^^^^^ File "C:\Users\DN761673\Downloads\TWM_New\.venv\Lib\site-packages\django\db\b ackends\utils.py", line 122, in execute return super().execute(sql, params) ~~~~~~~~~~~~~~~^^^^^^^^^^^^^ File "C:\Users\DN761673\Downloads\TWM_New\.venv\Lib\site-packages\django\db\b ackends\utils.py", line 79, in execute return self._execute_with_wrappers( ~~~~~~~~~~~~~~~~~~~~~~~~~~~^ sql, params, many=False, executor=self._execute ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "C:\Users\DN761673\Downloads\TWM_New\.venv\Lib\site-packages\django\db\b ackends\utils.py", line 92, in _execute_with_wrappers return executor(sql, params, many, context) File "C:\Users\DN761673\Downloads\TWM_New\.venv\Lib\site-packages\django\db\b ackends\utils.py", line 100, in _execute with self.db.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\DN761673\Downloads\TWM_New\.venv\Lib\site-packages\django\db\u tils.py", line 94, in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value File "C:\Users\DN761673\Downloads\TWM_New\.venv\Lib\site-packages\django\db\b ackends\utils.py", line 105, in _execute return self.cursor.execute(sql, params) ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^ File "C:\Users\DN761673\Downloads\TWM_New\.venv\Lib\site-packages\django\db\b ackends\sqlite3\base.py", line 359, in execute return super().execute(query, params) ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^ django.db.utils.IntegrityError: NOT NULL constraint failed: distributor_distributorrewardownershipledger.ownership_period_id