If a --contraint=A option is used in the access field of the SystemPartition then a corresponding line is emitted inside the sbatch script.
Passing additionally a constraint in the options field of the Job class, such as --contstraint=B emits a single line in the sbatch script after the line corresponding to --constraint=A.
Therefore, slurm takes into account only the B constraint.
The two constraint options should be combined and passed in a single line as: --constraint=A,B