We found that the reporting task failed twice because of integrity constraints.

This was because the rate_multiplier was being added as 1 and 1.0 which was not resolving to the same.
This updates the table to use Integrer.
Also changed the logging for the task.
This commit is contained in:
Rebecca Law
2018-05-10 15:35:58 +01:00
parent d52e65d89a
commit 8028f6cc28
4 changed files with 7 additions and 7 deletions

View File

@@ -1784,10 +1784,10 @@ class FactBilling(db.Model):
service_id = db.Column(UUID(as_uuid=True), nullable=False, index=True)
notification_type = db.Column(db.Text, nullable=False, primary_key=True)
provider = db.Column(db.Text, nullable=True, primary_key=True)
rate_multiplier = db.Column(db.Numeric(), nullable=True, primary_key=True)
rate_multiplier = db.Column(db.Integer(), nullable=True, primary_key=True)
international = db.Column(db.Boolean, nullable=False, primary_key=False)
rate = db.Column(db.Numeric(), nullable=True)
billable_units = db.Column(db.Numeric(), nullable=True)
billable_units = db.Column(db.Integer(), nullable=True)
notifications_sent = db.Column(db.Integer(), nullable=True)