CCI-MOC / flocx-market

2 stars 9 forks source link

Remove offer server_id unique constraint #136

Closed tzumainn closed 5 years ago

tzumainn commented 5 years ago

This PR removes the offer server_id unique constraint, and also adds a check to ensure that a new offer for a server cannot be created if there is an existing open offer for that server.

Fixes #50

tzumainn commented 5 years ago

In the longer term we'd probably throw a more personal exception.

codecov-io commented 5 years ago

Codecov Report

Merging #136 into master will increase coverage by 0.09%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #136      +/-   ##
==========================================
+ Coverage   93.19%   93.28%   +0.09%     
==========================================
  Files          51       51              
  Lines        1970     1997      +27     
==========================================
+ Hits         1836     1863      +27     
  Misses        134      134
Impacted Files Coverage Δ
flocx_market/db/sqlalchemy/api.py 95.95% <100%> (+0.19%) :arrow_up:
flocx_market/tests/unit/db/sqlalchemy/test_api.py 96.81% <100%> (+0.22%) :arrow_up:
flocx_market/db/sqlalchemy/models.py 98.5% <100%> (ø) :arrow_up:

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 ce1ea30...09384fd. Read the comment docs.