Skip to content

Instantly share code, notes, and snippets.

@milworm
Created August 14, 2017 06:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save milworm/200601e8d530050c7427e989318d0ede to your computer and use it in GitHub Desktop.
Save milworm/200601e8d530050c7427e989318d0ede to your computer and use it in GitHub Desktop.
sqlalchemy.exc.IntegrityError: (psycopg2.IntegrityError) null value in column "assignment" violates not-null constraint
DETAIL: Failing row contains (1, f, 2017-08-14 06:47:32.329408, 2017-08-14 06:47:32.329424, , null, sms, 23, , , , , "", , , f, null, , , 0, , , , , , , 2, 40).
[SQL: 'INSERT INTO contact_communication (deleted, created_ts, modified_ts, call_metric_id, assignment, type, description, landing_page_code, landing_page_url, direction, ga_cid, raw_data_json, user_agent, salesforce_id, is_voicemail, called_at, service_name, call_status, duration, call_recording_url, call_sid, from_number, to_number, salesforce_created_date, raw_data, created_by, contact_uid) VALUES (%(deleted)s, %(created_ts)s, %(modified_ts)s, %(call_metric_id)s, %(assignment)s, %(type)s, %(description)s, %(landing_page_code)s, %(landing_page_url)s, %(direction)s, %(ga_cid)s, %(raw_data_json)s, %(user_agent)s, %(salesforce_id)s, %(is_voicemail)s, %(called_at)s, %(service_name)s, %(call_status)s, %(duration)s, %(call_recording_url)s, %(call_sid)s, %(from_number)s, %(to_number)s, %(salesforce_created_date)s, %(raw_data)s, %(created_by)s, %(contact_uid)s) RETURNING contact_communication.id'] [parameters: {'created_ts': datetime.datetime(2017, 8, 14, 6, 47, 32, 329408), 'call_recording_url': '', 'landing_page_url': '', 'is_voicemail': False, 'call_sid': '', 'deleted': False, 'raw_data': '', 'description': '23', 'to_number': '', 'call_metric_id': '', 'modified_ts': datetime.datetime(2017, 8, 14, 6, 47, 32, 329424), 'created_by': 2, 'landing_page_code': '', 'ga_cid': '', 'from_number': '', 'duration': 0, 'call_status': '', 'called_at': None, 'contact_uid': 40, 'salesforce_id': '', 'assignment': None, 'direction': '', 'raw_data_json': '""', 'service_name': '', 'user_agent': '', 'salesforce_created_date': '', 'type': 'sms'}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment