Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion osf/models/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def _complete_add_log(self, log, action, user=None, save=True):
last_logged = log_date.replace(tzinfo=pytz.utc)
else:
recent_log = self.logs.latest('created')
log_date = recent_log.date if hasattr(log, 'date') else recent_log.created
log_date = recent_log.date if hasattr(recent_log, 'date') else recent_log.created
last_logged = log_date

if not log.should_hide:
Expand Down
1 change: 1 addition & 0 deletions osf_tests/metadata/test_serialized_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ def setUp(self):
mock.patch('osf.models.base.generate_guid', new=osfguid_sequence),
mock.patch('osf.models.base.Guid.objects.get_or_create', new=osfguid_sequence.get_or_create),
mock.patch('django.utils.timezone.now', new=forever_now),
mock.patch('osf.models.mixins.timezone.now', new=forever_now),
mock.patch('osf.models.metaschema.RegistrationSchema.absolute_api_v2_url', new='http://fake.example/schema/for/test'),
mock.patch('osf.models.node.Node.get_verified_links', return_value=[
{'target_url': 'https://foo.bar', 'resource_type': 'Other'}
Expand Down
Loading