Ismaël Bouya 339a09f2e4
Fix check in jobsets
The current check happening in jobsets is incorrect.
The wanted constraint is stated as follow :
- If type is 0 (legacy), then the flake field should be null, and
  both nixExprInput and nixExprPath should be non-null
- If type is 1 (flake), then the flake field should be non-null, and
  both nixExprInput and nixExprPath should be null

The current version will not catch (i.e. it will accept) situations
where you have for instance :
type = 1, nixExprPath null, nixExprInput non-null, flake non-null

This commit fixes that.

I split(ted) that into two constraints, to make it more readable and
easier to extend if a new type appears in the future.

The complete query could be instead :
( type = 0
  AND nixExprInput IS NOT NULL AND nixExprPath IS NOT NULL AND flake IS NULL )
OR ( type = 1
  AND nixExprInput IS NULL AND nixExprPath IS NULL AND flake IS NOT NULL )

(but an "OR" cannot be split, hence the other formulation)
2021-02-03 22:14:53 +01:00
..
2021-02-03 22:14:53 +01:00
2009-03-05 13:41:57 +00:00
2013-01-22 14:41:02 +01:00
2012-03-12 20:47:29 +01:00
2012-03-12 20:47:29 +01:00
2012-04-15 12:42:46 +00:00
2013-01-22 14:41:02 +01:00
2013-01-23 12:49:44 +01:00
2013-02-14 11:53:09 +01:00
2013-05-03 16:39:17 +02:00
2013-05-23 12:12:19 -04:00
2013-08-12 20:19:10 +02:00
2013-09-19 12:00:29 +00:00
2013-10-14 20:07:26 +02:00
2014-04-23 23:22:44 +02:00
2014-09-30 15:44:08 +02:00
2015-06-17 21:39:28 +02:00
2015-10-16 16:59:07 +02:00
2016-05-09 08:54:27 -04:00
2016-05-27 14:35:32 +02:00
2017-03-15 16:59:57 +01:00
2017-12-07 15:35:31 +01:00
2020-05-27 20:09:36 +02:00
2020-10-28 14:30:44 +01:00
2021-02-03 22:14:53 +01:00