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

Fix #843 - Issue when creating a new device if the DeviceID already exists #891

Merged
merged 3 commits into from
Jul 1, 2022

Conversation

ChristopheRib63
Copy link
Contributor

@ChristopheRib63 ChristopheRib63 commented Jun 30, 2022

Description

What's new?

What kind of change does this PR introduce?

  • Bugfix

@kbeaugrand kbeaugrand changed the title bug/843_DeviceID_already_exists Fix #843 - block the process if device already exists Jun 30, 2022
@kbeaugrand kbeaugrand changed the title Fix #843 - block the process if device already exists Fix #843 - Issue when creating a new device if the DeviceID already exists Jun 30, 2022
@codecov
Copy link

codecov bot commented Jun 30, 2022

Codecov Report

Merging #891 (03884fa) into main (8d9b86c) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #891      +/-   ##
==========================================
+ Coverage   82.98%   83.00%   +0.01%     
==========================================
  Files         154      154              
  Lines        5296     5300       +4     
==========================================
+ Hits         4395     4399       +4     
  Misses        901      901              
Impacted Files Coverage Δ
...l/Server/Controllers/v1.0/DevicesControllerBase.cs 97.65% <100.00%> (+0.07%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8d9b86c...03884fa. Read the comment docs.

@@ -191,6 +191,9 @@

Twin twin = null;

_ = this.mockDeviceService.Setup(c => c.GetDevice(It.IsAny<string>()))
.ReturnsAsync((Device)null);

Check warning

Code scanning / CodeQL

Useless upcast

There is no need to upcast from [null](1) to [Device](2) - the conversion can be done implicitly.
@@ -396,6 +396,9 @@

Twin twin = null;

_ = this.mockDeviceService.Setup(c => c.GetDevice(It.IsAny<string>()))
.ReturnsAsync((Device)null);

Check warning

Code scanning / CodeQL

Useless upcast

There is no need to upcast from [null](1) to [Device](2) - the conversion can be done implicitly.
@hocinehacherouf hocinehacherouf marked this pull request as ready for review July 1, 2022 07:26
@hocinehacherouf hocinehacherouf requested a review from a team as a code owner July 1, 2022 07:26
@hocinehacherouf hocinehacherouf merged commit 0a10fa0 into main Jul 1, 2022
@hocinehacherouf hocinehacherouf deleted the bug/843_DevideID_already_exists branch July 1, 2022 07:40
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.

Bug: Issue when creating a new device if the DeviceID already exists
2 participants