fix: make statement published time match statement doc time ()

* fix: make statement published time match statement doc time

* test: improve testing of creating statements
This commit is contained in:
Robert Sparks 2023-10-02 09:51:33 -05:00 committed by GitHub
parent 65627b5397
commit 9a09bf1f7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View file

@ -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:

View file

@ -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)