raise TransactionManagementError(
django.db.transaction.TransactionManagementError: An error occurred in the current transaction. You can't execute queries until the end of the 'atomic' block.
모델 생성 오류
ex)
for price in price_list:
models.PriceHistory.objects.create(
product=product_1,
price=price,
# commission=11111,
profits=1111
)
위와 같이 commission 필드가 모델 정의에 의해
NOT NULl
이어야 하는데, 일부러 주석처리를 해보았다.
for price in price_list:
models.PriceHistory.objects.create(
product=product_1,
price=price,
commission=11111,
profits=1111
)