mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Merge pull request #1715 from SchrodingersGat/tweaks
Change some warnings to infos
This commit is contained in:
commit
fcbb4c593b
@ -61,21 +61,21 @@ def is_email_configured():
|
|||||||
|
|
||||||
# Display warning unless in test mode
|
# Display warning unless in test mode
|
||||||
if not settings.TESTING:
|
if not settings.TESTING:
|
||||||
logger.warning("EMAIL_HOST is not configured")
|
logger.debug("EMAIL_HOST is not configured")
|
||||||
|
|
||||||
if not settings.EMAIL_HOST_USER:
|
if not settings.EMAIL_HOST_USER:
|
||||||
configured = False
|
configured = False
|
||||||
|
|
||||||
# Display warning unless in test mode
|
# Display warning unless in test mode
|
||||||
if not settings.TESTING:
|
if not settings.TESTING:
|
||||||
logger.warning("EMAIL_HOST_USER is not configured")
|
logger.debug("EMAIL_HOST_USER is not configured")
|
||||||
|
|
||||||
if not settings.EMAIL_HOST_PASSWORD:
|
if not settings.EMAIL_HOST_PASSWORD:
|
||||||
configured = False
|
configured = False
|
||||||
|
|
||||||
# Display warning unless in test mode
|
# Display warning unless in test mode
|
||||||
if not settings.TESTING:
|
if not settings.TESTING:
|
||||||
logger.warning("EMAIL_HOST_PASSWORD is not configured")
|
logger.debug("EMAIL_HOST_PASSWORD is not configured")
|
||||||
|
|
||||||
return configured
|
return configured
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ class APITests(InvenTreeAPITestCase):
|
|||||||
self.assertIn('version', data)
|
self.assertIn('version', data)
|
||||||
self.assertIn('instance', data)
|
self.assertIn('instance', data)
|
||||||
|
|
||||||
self.assertEquals('InvenTree', data['server'])
|
self.assertEqual('InvenTree', data['server'])
|
||||||
|
|
||||||
def test_role_view(self):
|
def test_role_view(self):
|
||||||
"""
|
"""
|
||||||
|
@ -144,7 +144,12 @@
|
|||||||
label: 'image',
|
label: 'image',
|
||||||
method: 'PATCH',
|
method: 'PATCH',
|
||||||
success: function(data, status, xhr) {
|
success: function(data, status, xhr) {
|
||||||
location.reload();
|
|
||||||
|
if (data.image) {
|
||||||
|
$('#company-image').attr('src', data.image);
|
||||||
|
} else {
|
||||||
|
location.reload();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -244,7 +244,14 @@
|
|||||||
label: 'image',
|
label: 'image',
|
||||||
method: 'PATCH',
|
method: 'PATCH',
|
||||||
success: function(data, status, xhr) {
|
success: function(data, status, xhr) {
|
||||||
location.reload();
|
|
||||||
|
// If image / thumbnail data present, live update
|
||||||
|
if (data.image) {
|
||||||
|
$('#part-image').attr('src', data.image);
|
||||||
|
} else {
|
||||||
|
// Otherwise, reload the page
|
||||||
|
location.reload();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -23,7 +23,7 @@ class TestParams(TestCase):
|
|||||||
def test_str(self):
|
def test_str(self):
|
||||||
|
|
||||||
t1 = PartParameterTemplate.objects.get(pk=1)
|
t1 = PartParameterTemplate.objects.get(pk=1)
|
||||||
self.assertEquals(str(t1), 'Length (mm)')
|
self.assertEqual(str(t1), 'Length (mm)')
|
||||||
|
|
||||||
p1 = PartParameter.objects.get(pk=1)
|
p1 = PartParameter.objects.get(pk=1)
|
||||||
self.assertEqual(str(p1), 'M2x4 LPHS : Length = 4mm')
|
self.assertEqual(str(p1), 'M2x4 LPHS : Length = 4mm')
|
||||||
|
Loading…
Reference in New Issue
Block a user