diff options
Diffstat (limited to 'indoteknik_custom/models/web_logging/web_utm_source.py')
| -rw-r--r-- | indoteknik_custom/models/web_logging/web_utm_source.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/indoteknik_custom/models/web_logging/web_utm_source.py b/indoteknik_custom/models/web_logging/web_utm_source.py index baeb0e9b..08b1e514 100644 --- a/indoteknik_custom/models/web_logging/web_utm_source.py +++ b/indoteknik_custom/models/web_logging/web_utm_source.py @@ -5,11 +5,11 @@ class UserActivityLog(models.Model): _name = 'web.utm.source' name = fields.Char(string='Name') - key = fields.Char(string='Key', unique=True) + key = fields.Char(string='Key') def find_or_create_key(self, key): utm_source = self.search([('key', '=', key)], limit=1) - if not utm_source: + if not utm_source and key: utm_source = self.create({ 'name': key, 'key': key |
