mirror of
https://github.com/ansible/awx.git
synced 2026-02-25 06:56:00 -03:30
Merge pull request #6923 from AlanCoding/datetime_warning
fix datetime warning
This commit is contained in:
@@ -10,7 +10,6 @@ import os
|
|||||||
import os.path
|
import os.path
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
from StringIO import StringIO
|
from StringIO import StringIO
|
||||||
from datetime import datetime
|
|
||||||
|
|
||||||
# Django
|
# Django
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
@@ -376,7 +375,7 @@ class UnifiedJobTemplate(PolymorphicModel, CommonModelNameNotUnique, Notificatio
|
|||||||
fields = self._get_unified_jt_copy_names()
|
fields = self._get_unified_jt_copy_names()
|
||||||
unified_jt = copy_model_by_class(self, unified_jt_class, fields, {})
|
unified_jt = copy_model_by_class(self, unified_jt_class, fields, {})
|
||||||
|
|
||||||
time_now = datetime.now()
|
time_now = now()
|
||||||
unified_jt.name = unified_jt.name.split('@', 1)[0] + ' @ ' + time_now.strftime('%I:%M:%S %p')
|
unified_jt.name = unified_jt.name.split('@', 1)[0] + ' @ ' + time_now.strftime('%I:%M:%S %p')
|
||||||
|
|
||||||
unified_jt.save()
|
unified_jt.save()
|
||||||
|
|||||||
Reference in New Issue
Block a user