Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

project, contestの終了時期を未定に戻す更新が出来るようにした #727

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

Tennessine699
Copy link
Contributor

resolves #694

Copy link

codecov bot commented Sep 12, 2024

Codecov Report

Attention: Patch coverage is 89.65517% with 3 lines in your changes missing coverage. Please review.

Project coverage is 70.99%. Comparing base (adea612) to head (4baf755).

Files with missing lines Patch % Lines
internal/infrastructure/repository/project_impl.go 83.33% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #727      +/-   ##
==========================================
+ Coverage   70.93%   70.99%   +0.06%     
==========================================
  Files          42       42              
  Lines        4576     4593      +17     
==========================================
+ Hits         3246     3261      +15     
+ Misses       1172     1171       -1     
- Partials      158      161       +3     
Flag Coverage Δ
integration 70.99% <89.65%> (+0.06%) ⬆️
unit 70.99% <89.65%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@H1rono H1rono left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

他は良さそうに見えます

internal/infrastructure/repository/contest_impl.go Outdated Show resolved Hide resolved
internal/infrastructure/repository/contest_test.go Outdated Show resolved Hide resolved
internal/infrastructure/repository/contest_test.go Outdated Show resolved Hide resolved
Copy link
Member

@H1rono H1rono left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

指摘漏れです、お願いします 🙏

argUntil := domain.YearWithSemester{Year: int(args.UntilYear.ValueOrZero()), Semester: int(args.UntilSemester.ValueOrZero())}
originValid := originUntil.IsValid()
// Untilが未定かどうかの状態が異なるか、Untilが異なる場合に更新
if validYear != originValid || (validYear && argUntil != originUntil) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if validYear != originValid || (validYear && argUntil != originUntil) {
if validYear != originValid || (validYear && argUntil.Equal(originUntil)) {

if validYear == validSemester {
originUntil, originValid := project1.Duration.Until.V()
argUntil := domain.YearWithSemester{Year: int(uy), Semester: int(us)}
if validYear != originValid || (validYear && argUntil != originUntil) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if validYear != originValid || (validYear && argUntil != originUntil) {
if validYear != originValid || (validYear && argUntil.Equal(originUntil)) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1回untilを設定すると未定に戻せない
2 participants