fix: make statement published time match statement doc time (#6419)
* fix: make statement published time match statement doc time * test: improve testing of creating statements
This commit is contained in:
parent
65627b5397
commit
9a09bf1f7b
|
@ -255,6 +255,7 @@ This test section has some text.
|
|||
statement.latest_event(NewRevisionDocEvent).rev, "00"
|
||||
)
|
||||
self.assertIsNotNone(statement.latest_event(type="published_statement"))
|
||||
self.assertIsNotNone(statement.history_set.last().latest_event(type="published_statement"))
|
||||
if postdict["statement_submission"] == "enter":
|
||||
self.assertEqual(statement.text_or_error(), "some stuff")
|
||||
else:
|
||||
|
|
|
@ -239,6 +239,7 @@ def new_statement(request):
|
|||
rev=statement.rev,
|
||||
by=request.user.person,
|
||||
desc="Statement published",
|
||||
time=statement.time,
|
||||
)
|
||||
statement.save_with_history([e1, e2])
|
||||
alias = DocAlias.objects.create(name=name)
|
||||
|
|
Loading…
Reference in a new issue